System Administration
Showing results for 
Search instead for 
Did you mean: 

Installing Net-SNMP on HP-UX

Frequent Advisor

Installing Net-SNMP on HP-UX

Has anyone had success with installing Net-SNMP on their HP-UX systems from the Internet Express bundle? I have installed it on my system with swinstall, but I need some guidance on what to do next. It appears the system is still running the default version of SNMP. How do I change it over to run the Net-SNMP that was installed. I am running HP-UX 11.23. Any help would be greatly appreciated. :-)
Rick Garland
Honored Contributor

Re: Installing Net-SNMP on HP-UX

Ping - I have the same questions. Any docos out there somewhere that can provide the details?

Re: Installing Net-SNMP on HP-UX

>Rick: I have the same questions. Any docs out there somewhere that can provide the details?

(You should really create your own thread so you can assign points and provide a link to this one.)

Using advanced search you can find these threads:
Frequent Advisor

Re: Installing Net-SNMP on HP-UX

I worked it out and wrote the following in an email to help someone else. I post it here hoping that it will be found in the future by others needing some help.

Hopefully you have installed Net-SNMP via a bundle from IEXpress. If not, do so now.

Basically, you will be tweaking the /sbin/init.d/SnmpMaster script to have it point to the new code for Net-SNMP that installed in /opt/iexpress/net-snmp/sbin/snmpd . However, there are some preliminaries. I first recommend that you do a ps -ea | grep -i nmp and see if snmpd is still running. If so, kill it via kill -9 [pid] .

Now, you can go ahead and create a valid config for your net-snmp install and test. First, recreate a valid snmpd.conf file and put it in /opt/iexpress/net-snmp/etc/snmp directory (you may need to create a directory, I had to). Just one line is all that is necessary in that snmpd.conf to get things started: rocommunity public That is enough in the file to be a valid config. Granted, you may not want to run using the get-community-name of public, bad security there, but this is just to get things rolling. There is a configuration script at /opt/iexpress/net-snmp/bin/snmpconf that will do a guided creation of a this same file if you prefer.

Ok, so now we have a valid snmpd.conf file and have put it where it goes. Now, if you want to make 100% sure you are starting net-snmp with the config file you created call it all explicitly like this:
/opt/iexpress/net-snmp/sbin/snmpd -c /opt/iexpress/net-snmp/etc/snmp/snmpd.conf Now that you have started it, lets test it with a call to snmpwalk and see if we get some valid output, like this:
snmpwalk -v 1 -c public localhost . That should fill your terminal screen with plenty of valid output, otherwise it will act stupid and not do anything and you will know that you do not have snmpd started yet.

Ok, with config and test done, now is the time to do two things. First, you will want to turn off all the Snmp related scripts on the system. Do this by going to /etc/rc.conf.d and doing a ll *nmp* to locate all the old Snmp related script config files. Edit each one changing 1 to 0 disable the start up. I am assuming you are following the Unix stuff here. Also, in the SnmpMaster file you will want to leave it set at 1, because that is the script we will modify to do our startup for net-snmp version of snmpd. Next, for the second big thing, edit the /sbin/init.d/SnmpMaster script to call the net-snmp code. I won't explain it step by step, but I will just copy the critical text I changed when I did it. You can compare to your original file and see what I did. Here are the critical changes, look for the differences very carefully (particularly that you will be changing snmpdm to snmpd):

export PATH

eval /opt/iexpress/net-snmp/sbin/snmpd -c /opt/iexpress/net-snmp/etc/snmp/snmpd.conf ${SNMP_MASTER_OPTIONS:-}

# Determine PID of process(es) to stop
pid=`ps -e | awk '$NF~/snmpd/ {print $1}'`

if [ "X$pid" != "X" ]; then
if kill -9 $pid; then
echo "snmpd stopped"
echo "Unable to stop snmpd"

Ok, this is it! You should be able to use /sbin/init.d/SnmpMaster stop and sbin/init.d/SnmpMaster start to stop and start the net-snmp snmpd daemon now. Verify this works by checking your processes and validate. Now, if you can, give that system a reboot and again validate that the snmpd daemon is running. Check the processes and test with snmpwalk again. You should be good to go!
Occasional Contributor

Re: Installing Net-SNMP on HP-UX

thanks bill_allen,

i follow your post, but when i run the /opt/iexpress/net-snmp/sbin/snmpd -c /opt/iexpress/net-snmp/etc/snmp/snmpd.conf
snmpwalk -v 1 -c public localhost .
i get the below error

Timeout: No Response from

please help
Occasional Visitor

Re: Installing Net-SNMP on HP-UX

I followed the same and it worked.


I suggest you go through it more carefully.

Re: Installing Net-SNMP on HP-UX

I fought this for 2 days...  Nothing would work unless I would talk on the localhost address only.  Anything else was not talking.


I had to install an older version to get my system to work.  This is the file name of the install that I found that worked for me...  net-snmp-5.4-1-HP-UX_B.11.11_9000_800.tar.gz


Good luck.