The runsnmp.ksh script
The runsnmp.ksh script on UNIX ensures that both the SNMP master agent and the onsrvapd server-discovery daemon are running on a host.
The runsnmp.ksh file is in the $INFORMIXDIR/snmp directory. You must correctly set the INFORMIXDIR environment variable to the latest installed version of the product and run the script as root.
>>-runsnmp.ksh--+------------------------+--+------+------------> +- -m--master_agent_args-+ '-stop-' '- -s--server_disc_args--' >--+-------+--------------------------------------------------->< '-start-'
Issue the runsnmp.ksh commands that
the following diagram shows.
| Option | Description |
|---|---|
| -m master_agent_args | The master-agent arguments can be either stop or valid master-agent arguments. |
| -s server_disc_args | The server-discovery arguments can be either stop or valid onsrvapd arguments. |
| start | Starts snmpdm and onsrvapd if they are not running. This option is the default. |
| stop | Stops snmpdm and onsrvapd if they are already running and exits. |
The master_agent_args and the server_disc_args are not checked for correctness.
The following examples illustrate how to use runsnmp.ksh:
- Start snmpdm and onsrvapd if they are not running.
runsnmp.ksh - Stop onsrvapd and subagents and then exit.
runsnmp.ksh -s stop - Stop onsrvapd and any subagents and then restart onsrvapd.
runsnmp.ksh -s stop start - Stop snmpdm, onsrvapd, and any subagents and
then exit.
runsnmp.ksh stop - Stop snmpdm or snmpdp, onsrvapd, and any subagents and
then restart snmpdm or snmpdp and onsrvapd.
runsnmp.ksh stop start - Start snmpdm if it is not running, and then start onsrvapd with
the none option, if it is not running.
runsnmp.ksh -s “-rnone”
