Introduction
This chapter describes system messages, as defined by the syslog protocol (RFC 3164). It describes how to understand the syslog message format and how to capture system messages for review.
System Log Message Format
System log messages begin with a percent sign (%) and are displayed in the following formats:
Syslog Format On a Resident Switch
The format for a resident syslog is:
FACILITY is a code consisting of two or more uppercase letters that indicate the facility to which the system message refers. A facility is a hardware device, a protocol, a feature, or a module of the system software.
System message SEVERITY codes range from 0 to 7 and reflect the severity of the condition. The lower the number, the more serious the situation. Table 1-2 lists the severity levels.
|
|
---|---|
MNEMONIC is a code that uniquely identifies the system message.
Message-text is a text string that describes the condition. This portion of the message might contain detailed information about the event, including terminal port numbers, network addresses, or addresses that correspond to locations in the system memory address space. Because the information in these variable fields changes from message to message, it is represented here by short strings enclosed in square brackets ( [ ]). A decimal number, for example, is represented as [dec].
Table 1-3 lists the representations of variable fields and the type of information in the fields.
|
|
---|---|
The following example system message shows how the variable field might be used:
Facility code =MODULE (indicating that it is a module-specific error)
Alarm/event code= MOD_MINORSWFAIL
Description of the problem= Module [dec] reported a failure in service [chars]
[dec] is the module slot number associated with this message.
[chars] is the service name that experienced this failure.
System log messages begin with a percent sign (%) and are displayed in the following format (see Table 1-4 ).
Syslog Format On a Remote-Logging Server
The syslog format on a remote-logging server is:
FACILITY is a code consisting of two or more uppercase letters that indicate the facility to which the system message refers. A facility is a hardware device, a protocol, a feature, or a module of the system software.
System message SEVERITY codes range from 0 to 3 and reflect the severity of the condition. The lower the number, the more serious the situation. Table 1-5 lists the severity levels.
|
|
---|---|
MNEMONIC is a code that uniquely identifies the system message.
Message-text is a text string that describes the condition. This portion of the message might contain detailed information about the event, including terminal port numbers, network addresses, or addresses that correspond to locations in the system memory address space. Because the information in these variable fields changes from message to message, it is represented here by short strings enclosed in square brackets ( [ ]). A decimal number, for example, is represented as [dec].
Table 1-6 lists the representations of variable fields and the type of information in the fields.
|
|
---|---|
The following example system message shows how the variable field might be used:
Facility code =AUTHPRIV (indicating that it is a authpriv-specific error)
Description of the problem= Authpriv [dec] reported a failure in service [chars]
[dec] is the module slot number associated with this message.
Capturing System Messages and History
The system messages are displayed instantly on the console, by default, or are redirected to an internal log file, or a syslog server. System message severity levels correspond to the keywords assigned by the logging global configuration commands. These keywords define where and at what level these messages appear (see to the Cisco NX-OS System Management Configuration Guid e). Only system messages that correspond to the configured logging level or higher severity messages are logged. As an example, if you set the logging level to 3 (error), then you get error, critical, alerts, and emergency system messages, but you do not get warning, notification, informational, or debugging system messages.
For complete information about handling system messages, see the Cisco NX-OS System Management Configuration Guide, Release 4.1.
Saving the System Messages Log
The logging logfile global configuration command enables copying of system messages to an internal log file and optionally sets the size of the file. To display the messages that are logged in the file, use the show logging EXEC command. The first message displayed is the oldest message in the buffer. To clear the current contents of the buffer, use the clear debug-logfile command.
Logging System Messages to a Syslog Server
The logging host-name command identifies a syslog server host to receive logging messages. The host-name argument is the name or Internet address of the host. By issuing this command more than once, you build a list of syslog servers that receive logging messages. The no logging host-name command deletes the syslog server with the specified address from the list of syslog servers.