rc scripts are installed for all SNMP related products, which permits automatically starting one or more agents during POSIX startup or an automatic stop when POSIX is terminated. In order to enable the automatic startup of NET-SNMP or any of its agents, their respective rc files should be modified to match your configuration.
The RC script for the NET-SNMP master agent starts 'snmpd' as follows:
_OPTIONS="-LS0-6d -p /var/run/snmpd.pid -q"
snmpd $_OPTIONS
The default configuration file for snmpd can be found in:
/etc/snmp/snmpd.conf
Usage for net-snmp package (snmpd):
/etc/rc2.d/S90net-snmp start|restart|stop|status
Examples for SNMP daemon:
/etc/rc2.d/S90net-snmp start
/etc/rc2.d/S90net-snmp stop
/etc/rc2.d/S90net-snmp restart
/etc/rc2.d/S90net-snmp status
Usage for snmp-agents package:
In order to start any of the SNMP agents, the master agent (snmpd) has to be started first.
/etc/rc2.d/S91snmp-agents start|restart|stop|status [appMonAgent|consoleA
gent|openFTAgent|openSM2Agent|spoolAgent|storageAgent|hostAgent|hsmsAgent|openUTMAge
nt]
Examples for SNMP agents:
If the S91snmp-agents script is executed with only one of the mandatory parameters (start/stop/restart/status), the designated action will be performed for all agents:
/etc/rc2.d/S91snmp-agents start
appMonAgent is started
log file is: /var/adm/appMonAgent.log
consoleAgent is already started
openFTAgent is started
log file is: /var/adm/openFTAgent.log
openSM2Agent is started
log file is: /var/adm/openSM2Agent.log
spoolAgent is started
log file is: /var/adm/spoolAgent.log
storageAgent is started
log file is: /var/adm/storageAgent.log
hostAgent is started
log file is: /var/adm/hostAgent.log
hsmsAgent is started
log file is: /var/adm/hsmsAgent.log
openUTMAgent is started
log file is: /var/adm/openUTMAgent.log
If the agent name is given as the second argument, the S91snmp-agents will start/stop/restart/status only the chosen agent:
/etc/rc2.d/S91snmp-agents start consoleAgent
consoleAgent is started
log file is: /var/adm/consoleAgent.log
In order to add custom parameters please change _CUSTOM_XXX_config variable in the S91snmp-agents script where XXX is the name of the agent, for example "console", "ftp", "host"...
Example for hsmsAgent
_CUSTOM_hsms_config="-l \$SYSHSMS.SYSLIB.HSMS.120"
Example for consoleAgent
_CUSTOM_console_config="-o tsos -y sysadm"
Note
Using plain-text passwords is not safe. The Console Agent facilitates the usage of authentication files, which are AES-encrypted. In order to create such file proceed as follows:
Call
"consoleAgent -A"
Follow the prompt
Edit rc file by passing argument -a with absolute PATH to the created auth-file.