Hitachi

JP1 Version 12 JP1/Extensible SNMP Agent Description, Operator's Guide and Reference


7.3.2 Log output destination

The output destination for logs can be changed using the SR_LOG_DIR environment variable in the snmpdm process environment variable definition file (SnmpMaster). The file name is set to snmpd.logn, and cannot be changed.

For details about the SR_LOG_DIR environment variable, see snmpdm in Chapter 5. Commands and Processes.

The following procedure shows how to change the output destination for logs.

Procedure

  1. Use the snmpstop command to stop SNMP Agent.

    If the OS being used is Solaris or AIX, and you do not want to shut down the native agent, execute the snmpstop command with the -n option.

  2. Specify the output destination for logs in the SR_LOG_DIR environment variable.

    Example:

    SR_LOG_DIR=/tmp/esalog
    export SR_LOG_DIR
  3. Use the snmpstart command to restart SNMP Agent.

    If the OS being used is Solaris or AIX, and you do not want to restart the native agent, execute the snmpstart command with the -n option.

By default, the data collection command (jp1esalog.sh.def) is set to collect logs from /var/adm/snmpd.logn. If you change the log output destination, you must also change the log output destination used during jp1esalog.sh.def execution. To change the log output destination when the jp1esalog.sh.def command is executed, use a text editor such as vi to change the output destination for logs. The following shows an example of editing the jp1esalog.sh.def command.

Before change
COLFILE="$COLFILE ./var/adm/snmpd.log* ./var/adm/*agt*.log ./etc/SnmpAgent.d ./etc/srconf/agt"
After change
COLFILE="$COLFILE ./tmp/esalog/snmpd.log* ./var/adm/*agt*.log ./etc/SnmpAgent.d ./etc/srconf/agt"
Important

Before you edit the jp1esalog.sh.def command, always make a backup of the command.