1832645 Members
2861 Online
110043 Solutions
New Discussion

stopping snmp

 
SOLVED
Go to solution
Donald Thaler_1
Advisor

stopping snmp

trying to stop snmpd with the following command snmpd -stop but it returns the following:
-----------------------------------------------
snmpd -stop
Start SNMP Master Network Management daemon
SNMP Research SNMP Agent Resident Module Version 15.3.1.0
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 SNMP Research, Inc.
# Start SNMP HP-UNIX Network Management subAgent
Start SNMP IPv6 Network Management subAgent
Start SNMP MIB-2 Network Management subAgent
Start Native Adapter Agent
SKIPPED (as configured in /etc/rc.config.d)
Start SNMP Trap Dest Network Management subAgent
Start SNMP PCI FDDI Network Management subAgent
---------------------------------------------
at this point nothing more happens, i can't tell if it's completed or what... should i receive some indication the the snmp process has stopped ( when i do a ps -ef|grep the snmpd process is still active) ??
13 REPLIES 13
Pete Randall
Outstanding Contributor

Re: stopping snmp

I don't see "-stop" as being a valid option in the man page. It looks like it's not "stopping", but trying to start. I would take a look at the /sbin/init.d/Snmp scripts, figure out which order the three of them are run at shutdown and invoke them, in that order, from the command line.


Pete

Pete
Johnson Punniyalingam
Honored Contributor

Re: stopping snmp

>>( when i do a ps -ef|grep the snmpd process is still active) ??<<

Does "ps -ef |grep snmpd -> valid time stamp ?




1) Modified /etc/rc.config.d/SnmpMaster for startup /Stop of daemon upon system boot.

# tail /etc/rc.config.d/SnmpMaster
# libSaMib2.sl(1M) // MIB2 subAgent
# libSaHpunix.sl(1M) // HpUnix subAgent
# snmpd(1M) // Manual startup script
# snmpd.conf(4) // SNMP configuration
#
#
SNMP_MASTER_START=0 # Stop the master SNMP agent.
export SNMP_MASTER_START
#

2) Manually started via `/sbin/init.d/SnmpMaster start`.

# ps -ef |grep snmpdm
root 13397 13262 1 22:32:54 ttyp0 0:00 grep snmpdm
root 13373 1 0 22:30:12 ? 0:00 /usr/sbin/snmpdm
#

Please verify the following settings also:
===================================
SNMP_HPUNIX_START=0 (at "/etc/rc.config.d/SnmpHpunix")
SNMP_MIB2_START=0 (at "/etc/rc.config.d/SnmpMib2")
SNMP_TRPDST_START=0 (at "/etc/rc.config.d/SnmpTrpDst")
Problems are common to all, but attitude makes the difference
Donald Thaler_1
Advisor

Re: stopping snmp

figure out which order the three of them are run at shutdown and invoke them, in that order, from the command line.

what file shows the order of these being shutdown ?

there was another post that said to stop snmp you have to stop all the subagents identified in /sbin/rc1.d (those beginning with a 'K') and write a script to stop each one of them... if i were to choose that method of stopping should i be looking at only those subagents that have snmp in the file name ??
Pete Randall
Outstanding Contributor
Solution

Re: stopping snmp

ll /sbin/rc?.d |grep nmp |grep K

will show you the Kill scripts - the number shows the order they're run in.

"man rc" may help familiarize you with the startup/shutdown process.


Pete

Pete
Donald Thaler_1
Advisor

Re: stopping snmp

only some of the 'K' scripts have snmp in their title... should i use all the 'K' scripts or only those that have 'snmp' in the name ??
Torsten.
Acclaimed Contributor

Re: stopping snmp

Why not giving "bastille" a try like suggested yesterday? This will harden your system.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Pete Randall
Outstanding Contributor

Re: stopping snmp

just the snmp ones


Pete

Pete
Donald Thaler_1
Advisor

Re: stopping snmp

i looked at bastille... it's a bit overwhelming especially when the only thing i have to do right now is stop snmp.
i never knew their was a bastille, or what it was capable of doing, thanks for pointing it out... unfortunately i get to do unix sysadmin functions when i'm not doing dba functions and when i'm not doing banner technical things,our student enterprise management system, technical things.

since we just went thru a security audit i'm doing unix admin things related to the audit, one of which had to do with snmp.

so do i stop all the 'K' scripts or only those that are identified as 'Snmp' ??
Torsten.
Acclaimed Contributor

Re: stopping snmp

Before doing anything harmful while modifying the S and K scripts just run bastille, go through the question sections and disable snmp and whatever is criticized by your audit. This is IMHO the most safe way for you ...


See also

http://docs.hp.com/en/5992-5099A/index.html

http://docs.hp.com/en/5992-5099A/apc.html

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Donald Thaler_1
Advisor

Re: stopping snmp

what file would i have to update so that on a reboot the Snmp agents aren't started ?
Torsten.
Acclaimed Contributor

Re: stopping snmp

Search for SNMP in the second link.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Pete Randall
Outstanding Contributor

Re: stopping snmp

> Before doing anything harmful while modifying the S and K scripts


I didn't say anything about modifying. I said "run them".

The /etc/rc.config.d/*Snmp* files control the startup. Simply set the various SNMP_*_START variables to 0 rather than 1 and snmp won't start up.


Pete

Pete
Torsten.
Acclaimed Contributor

Re: stopping snmp

As said, click the second link and scroll down to "MiscellaneousDaemons.snmpd".

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!