- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Start/Stop Snmp after modification
Operating System - HP-UX
1820249
Members
2592
Online
109622
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2006 10:23 AM
тАО07-19-2006 10:23 AM
Start/Stop Snmp after modification
What is the proper way to Stop and Start the snmp agent? I just modified the snmpd.conf files in /etc and in /etc/SnmpAgentd (to set the get-comunity-name to a value other than "public") and need to recycle the agent to allow the changes to take effect.
There appear to be 6 scripts in the /sbin/init.d folder:
SnmpMaster
SnmpHpunix
SnmpMib2
SnmpTrpDst
SnmpFddi
SnmpFddi4
The only snmp process I have running (ps -ef) is snmpdm.
I have an HP N4000 running HP-UX 11.11
I gather from the man pages that the last one to stop, and the first one to start is the SnmpMaster script. But what of the others???
There appear to be 6 scripts in the /sbin/init.d folder:
SnmpMaster
SnmpHpunix
SnmpMib2
SnmpTrpDst
SnmpFddi
SnmpFddi4
The only snmp process I have running (ps -ef) is snmpdm.
I have an HP N4000 running HP-UX 11.11
I gather from the man pages that the last one to stop, and the first one to start is the SnmpMaster script. But what of the others???
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2006 10:38 AM
тАО07-19-2006 10:38 AM
Re: Start/Stop Snmp after modification
Ok, the answer is a little complicated but it will apply to anything started and stoped by rc so it's worth learning. The scripts found in /sbin/init.d are never used directly by rc; they are intended for manual use. The "real" work is done by the entries in /sbin/rcN.d where N is the run-level; these directories contain symbolic links to entries in /sbin/init.d. In almost all cases, if a service is started in run-level N is is stopped in run-level N - 1. SNMP is started in run-level 2 and stopped in run-level 1.
Do an ls -l /sbin/rc1.d and find all the links that begin with 'K' that link to your SNMP scripts in /sbin/init.d.
You execute each of these in the lexical order listed (e.g. K201xxx before K303xxx);
you can execute either the files in /sbin/rc1.d/ or those in /sbin/init.d -- just do them in the order listed in the rc1.d directory.
e.g. /sbin/rc1.d/K424SnmpFddi4 stop
Now do all of those to stop SMNP. Some may actually do nothing but that's automatically taken care of by entries under /etc/rc.config.d.
Now that has you stopped; you next do the same thing under /sbin/rc2.d and look for the S entries that match your SNMP scriots in init.d; you execute these in lexical order as well using "start" as a paramter.
Now wasn't that complicated? That's why the next time you do this, you are going to write a script.
Do an ls -l /sbin/rc1.d and find all the links that begin with 'K' that link to your SNMP scripts in /sbin/init.d.
You execute each of these in the lexical order listed (e.g. K201xxx before K303xxx);
you can execute either the files in /sbin/rc1.d/ or those in /sbin/init.d -- just do them in the order listed in the rc1.d directory.
e.g. /sbin/rc1.d/K424SnmpFddi4 stop
Now do all of those to stop SMNP. Some may actually do nothing but that's automatically taken care of by entries under /etc/rc.config.d.
Now that has you stopped; you next do the same thing under /sbin/rc2.d and look for the S entries that match your SNMP scriots in init.d; you execute these in lexical order as well using "start" as a paramter.
Now wasn't that complicated? That's why the next time you do this, you are going to write a script.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2006 03:44 AM
тАО07-20-2006 03:44 AM
Re: Start/Stop Snmp after modification
Very nice reply Clay. 'Problem solved. I researched the /sbin/rc1.d nd rc2.d listings and wrote a script to execute the snmp stops and starts (my typing speed would have been to slow to execute it efficiently in real-time). Everything worked wonderfully.
Thank you
Thank you
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP