Hitachi

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


jp1esalog.sh.def

Organization of this page

Syntax

jp1esalog.sh.def

Description

The jp1esalog.sh.def command is a command to be executed immediately after occurrence of an error.

First, this command uses the tar command to archive the directories or files that contain log information immediately under the root directory. Then, this command uses the compress command to compress the created archive file. By default, this command creates the /tmp/jp1esa/jp1esa.log.tar.Z file. If this file already exists, the existing file is overwritten.

You can execute this command while SNMP Agent is running.

Location

Arguments

None

Who can execute the command

A superuser can execute this command.

Return values

0: Normal termination

8: One of the following runtime errors occurred (an error message is output):

Customizable items

This command is a shell script. The following describes what you can customize when using this command.

Changing the default output file

To change the default output file, customize the following line:

# Log output file defaultname
OUTFILE="/tmp/jp1esa/jp1esa.log"

When a file name is specified, the following file is created:

specified-file-name.Z
Changing the work directory

To change the work directory, customize the following line:

# Working directory
WORKDIR="/tmp/jp1esa/work"

When this command is executed, it creates a temporary work directory in which it temporarily saves the files it creates. This means that the command requires a certain amount of free disk space to operate. By default, this directory is created in the directory that is used to store the output files. Edit the above line if you want to change the location of the work directory.

Collecting other information such as user-created files

To collect other information, customize the following line:

# User Additional files
ADDFILE=""

Note that when you specify additional files in the ADDFILE variable, always prefix a period (.) to the full path name of each file, and separate each entry with a space.

Example: ADDFILE="./var/tmp/user_log ./etc/opt/sample/conf"

Notes

#1: Log information, hexadecimal dumps, and VarBind lists are output to the snmpd.logn files. The size and number of snmpd.logn files are specified with the following environment values in the SnmpMaster file:
  • File size: SNMP_HTC_SNMPD_LOG_SIZE

    The following shows a specification example for the SNMP_HTC_SNMPD_LOG_SIZE environment variable. The unit is megabytes. In the example, 10 megabytes is specified as the file size.

    Example:

SNMP_HTC_SNMPD_LOG_SIZE=10
export SNMP_HTC_SNMPD_LOG_SIZE
  • Number of files: SNMP_HTC_SNMPD_LOG_CNT

    The following shows a specification example for the SNMP_HTC_SNMPD_LOG_CNT environment variable. The unit is the number of files. In the example, 10 is specified as the number of files.

    Example:

SNMP_HTC_SNMPD_LOG_CNT=10
export SNMP_HTC_SNMPD_LOG_CNT

For details about environment variables, see snmpdm.

By default, the size of each file is set to 10 megabytes, which means that in order to create 10 files, an area that can accommodate 100 megabytes must be available for the directory in which the snmpd.logn files are stored.

#2: The following processes send their output to the snmpd.logn files:

snmpdm, naaagt, hp_unixagt, extsubagt, trapdestagt, htc_unixagt1, htc_unixagt2, htc_unixagt3, htc_unixagt4