Operating System - HP-UX
1820600 Members
1638 Online
109626 Solutions
New Discussion юеВ

Starting/Stopping snmp agents on HP-UX 11.0

 
SOLVED
Go to solution
Jack C. Mahaffey
Super Advisor

Starting/Stopping snmp agents on HP-UX 11.0

Which /sbin/rc#.d scripts do I use to stop and restart the snmp agents on HP-UX.
Doing an ll on /sbin/init.d/*nmp* lists the following:
-r-xr-xr-x 1 bin bin 6274 Oct 27 1997 SnmpHpunix
-r-xr-xr-x 1 bin bin 4317 Oct 27 1997 SnmpMaster
-r-xr-xr-x 1 bin bin 6380 Oct 27 1997 SnmpMib2
-r-xr-xr-x 1 bin bin 6285 Oct 27 1997 SnmpTrpDst

/sbin/rc2.d shows the following:
S560SnmpMaster S565SnmpHpunix S565SnmpMib2 S565SnmpTrpDst


I'm making a change to the /etc/snmpd.conf file and need to restart the background programs.

jack...
9 REPLIES 9
Helen French
Honored Contributor

Re: Starting/Stopping snmp agents on HP-UX 11.0

HI Jack,

I would suggest you to read the man pages of 'snmpd'

# man snmpd

This will give you the information about how to restart the snmp daemons manually. You have to stop and restart all the snmp scripts with the proper order. If you want just the daemon to restart, then use 'snmpd -c'.

HTH,
Shiju
Life is a promise, fulfill it!
S.K. Chan
Honored Contributor
Solution

Re: Starting/Stopping snmp agents on HP-UX 11.0

SnmpMaster will start snmpd daemon which in turn fires up other snmp subagents like mib2 and trap-destination, depending on what's being defined in /etc/snmpd.conf. So doing ..
# /sbin/init.d/SnmpMaster stop
# /sbin/init.d/SnmpMaster start
will do ..
Jack C. Mahaffey
Super Advisor

Re: Starting/Stopping snmp agents on HP-UX 11.0

The snmpd -c is no longer available.

To be safe, I'm executing each of the *Snmp* scripts in rc1.d and rc2.d.


Thanks for the info.

I also noticed that the /var/adm/snmpd.log is not getting any info logged. Oh well... ;(

jack...
Rose Lariviere
Occasional Advisor

Re: Starting/Stopping snmp agents on HP-UX 11.0

There is a script that will start the snmp master and all of the subagents necessary.
just type in: snmpd -stop
or: snmpd -start
when done, type: ps -ef | grep snmpd
Notice that it only shows snmpdm running!

If you kill "snmpdm" with the kill command and then want to restart it, DO NOT type in
"snmpdm". This will only start the master daemon and not the subagents necessary.

You can manually start all of the subagents via the /sbin/init.d/snmpd scripts but you take a chnance of possibly missing one.
pap
Respected Contributor

Re: Starting/Stopping snmp agents on HP-UX 11.0

Hi,
If you want to stop the snmp process

1. findout the PID of process "snmpdm"
2. Kill -9 PID.

That will stop the snmp daemon.

If you want to srat it then do following.

3./usr/sbin/snmpdm

You are all set now.

WHile installing SNMP security patch you have to kill the snmp daemons otherwixe your patch installation will hangs in between.

-pap.
"Winners don't do different things , they do things differently"
Jack C. Mahaffey
Super Advisor

Re: Starting/Stopping snmp agents on HP-UX 11.0

I see some comflicting comments. One says to NOT start snmpdm alone [ won't start sub-agents] and the other says it's okay to execute snmpdm.

I ended up using all rc1.d and rc2.d *Snmpd* scripts to be safe.

Thanks... Jack..
S.K. Chan
Honored Contributor

Re: Starting/Stopping snmp agents on HP-UX 11.0

I just checked the man pages for snmpd and it says .. somewhere in the pages ..

Quote ..
There are two ways to start the SNMP Agent manually. The first way is to execute snmpdm and then start each subAgent. Separate process subAgents are started by invoking the particular subAgent executables.

The second and simplest way to start the SNMP Agent manually is to execute the snmpd startup script which will invoke the Master Agent and all subAgents who have been installed and designed to operate in this paradigm. The snmpd script is layered upon the V.4 startup
paradigm and so makes use of the component startup scripts in /sbin/init.d and configuration scripts in /etc/rc.config.d. When snmpd is invoked it starts /usr/sbin/snmpdm, passes all its command
line arguments to it and then executes each script (S*) found in /sbin/SnmpAgtStart.d.
Unquote..

So my conclusion is, to be sure each of the subagents can be startup individually like what you've did. However starting snmpd alone from /sbin/init.d/SnmpMaster should also work because the snmpd script (/usr/sbin/snmpd) will take care of starting the subagents. It if doesn't do that, it has to do with what options you put in /etc/rc.config.d/SnmpMaster that influences the startup behaviour.
Jack C. Mahaffey
Super Advisor

Re: Starting/Stopping snmp agents on HP-UX 11.0

The HP Forum rules... :)

Thanks for clearing things up...


Thanks... I love this place :) :)


jack...
Helen French
Honored Contributor

Re: Starting/Stopping snmp agents on HP-UX 11.0

Hi Jack,

Do a 'man snmpd'. This will tell you the order and syntax of the daemons, that should stop and start. Also you can read about restarting only the 'snmpd' daemon and the reasons.

# man snmpd

HTH,
Shiju
Life is a promise, fulfill it!