1.1.4 Operation log and type log
You can save the following operation logs in the order in which they occurred, and then use show logging commandto view them:
-
Entered command. (Message-type KEY)
-
Messages output by the device in response to command input (message type RSP)
-
Scripted input commands (message-type SKY)
-
Messages output by the device to scripted input commands (message type SRS)
-
Operational messages (except for message type AUT,DSN)
For details about the message type KEY,RSP,SKY and SRS operation log format, see 1.3.2 Format of operation log.
Category logs categorize the message type ERR and EVT operational messages by message identifier, and record the date and time when the event first occurred, and the date and time when the event last occurred, and the cumulative count. You can use show logging command. You can specify and view reference parameters.
- <Structure of this section>
(1) Log specifications
The following table describes the specifications of the operation log and type log.
Item |
Operation log |
Reference log |
---|---|---|
Log contents |
|
|
Target message type |
|
|
Number of acquired entries |
|
|
Overflow processing when the log size is exceeded |
|
|
- #1
-
Not acquired if the event location is SCRIPT.
- #2
-
Not acquired for event-level R8~R5.
(2) Automatic log save
The operation log and type log are automatically saved in the on-chip flash memory at the following timing: and the destination to which they are saved. If the configuration command no logging syslog-dump is set, it is automatically saved only in the event of the following 1.
- Occasions when logs are automatically saved:
-
-
When the Switch is started
-
When a critical error with an event level from E9 to E5 occurs
-
When the device is restarted by using the reload operation command
-
When login or logout is performed
-
When the device is restarted accompanying ppupdate
-
When the device is restarted by pressing the RESET button
-
Log type |
Location of internal memory |
---|---|
Operation log |
Logs are saved to /usr/var/log/system.log |
Reference log |
Logs are saved to /usr/var/log/error.log |
(3) How to create a log file
Operation logs and type logs can be retrieved as files. by specifying redirection when executing the show logging command. If you want to output command output results to a file for a command other than the show logging command, you also must specify redirection. The following table describes the directory for storing the created files when redirection is specified for a command.
Item |
Storage directory |
Remarks |
---|---|---|
Home directory for the user |
/usr/home/<user-account-name>/ |
Stored in internal memory |
Temporary directory |
/tmp/ |
When the switch stops due to power discontinuity or the reload command, stored files will be deleted. |
The following shows an example of creating a backup of log information by executing the show logging command.
- Backing up the operation log in internal memory:
> show logging > /usr/home/<User Account Names>/<File Name> >