|
This chapter describes how messages from the switch are formatted and how you can enable the System Message Log feature to send messages to the switch internal buffer and system console for display (and optionally, to a logging server on another system). Not all messages indicate problems; some messages are only informational, while others help diagnose problems with communications lines, internal hardware, or the system software.
Messages are listed by the facility (hardware device, protocol, or a module or system software) that produces the messages. Within each facility, messages are listed by the severity level, from highest to lowest. Each message is followed by an explanation and a recommended action. Messages appear only when the system remains operational.
The following is a sample system message:
3/17/2002,18:31:15
is the date and time of the error (this appears if set for system log messaging).
5
is the severity level, indicating that it is a normal but significant condition.
MOD_INSERT
is the mnemonic code that uniquely identifies the message.
Module 5 has been inserted
is the message text.
This chapter contains the following sections:
The messages include the following information:
For example, the messages are structured as follows:
Messages from the System Message Log are structured the same, but include this date/time stamp at the beginning of the message:
is the date and time of the error or event.
The facility code consists of two or more uppercase letters that indicate the facility to which the message refers. A facility can be a hardware device, a protocol, or a module within the system software. Table 1-1 lists the facility codes.
Code | Facility |
---|---|
The severity level is a single digit from 0 to 7 that reflects the severity of the condition. The lower the number, the more serious the situation. Table 1-2 lists the severity levels.
The MNEMONIC code uniquely identifies the error message. All mnemonics are all uppercase character strings.
The
description field is a text string that describes the condition. The text string may 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 these variable fields can change from message to message, they are represented by short strings in square brackets ([]
). A decimal number, for example, is represented as [dec]
. Table 1-3 describes how the variable fields are represented in the messages.
The System Message Log (syslog) software can save system messages in a log file or direct the messages to other devices. The system message logging software has these features:
By default the switch logs normal but significant system messages to its internal buffer and sends these messages to the system console. You can specify which system messages should be saved based on the type of facility and the severity level. Messages can be time-stamped to enhance real-time debugging and management.
You can access logged system messages using the switch CLI or by saving them to a properly configured syslog server. The switch software saves syslog messages in an internal buffer. You can also save messages on UNIX servers that are configured properly. The syslog software reads the messages from the buffer and sends them to the specified destination.
With syslog, you can access system messages by logging in to the console through Telnet. This allows you to monitor system messages remotely from any workstation that supports the Telnet protocol.
The switches ship with the default configuration shown in Table 1-4.
Configuration Parameters | Default Setting |
---|---|
sys/5 |
When you first log on to the switch console, enter the show logging command to display the default configuration.
This section describes how to configure the options for the System Message Log.
To change the default system message logging facility and severity levels, perform one of these tasks in privileged mode:
This example shows how to change the default system message logging facility and severity levels for the Cisco Discovery Protocol (CDP) to severity level 3:
Note To receive syslog messages for a message facility, the server severity level must be set equal to or greater than the default severity level set for the message facility. |
This example shows how to disable system message logging to the console:
Before you can send system log messages to a UNIX syslog server, you must configure the syslog daemon on the UNIX server.
To configure the syslog daemon, log in as root and perform these steps:
Task | Command | |
---|---|---|
Step 1 | ||
Step 2 | Create the log file by entering these commands at the UNIX shell prompt. |
|
Step 3 | Make sure the syslog daemon reads the new changes by entering this command. |
1The switch sends messages according to specified facility types and severity levels. The user keyword specifies the UNIX logging facility. The messages from the switch are generated by user processes. The debug keyword specifies the severity level of the condition being logged. You can set UNIX systems to receive all messages from the switch.
2There must be five tab characters between user.debug and /var/log/myfile.log. Refer to entries in the /etc/syslog.conf file for further examples. |
Before you can send system log messages to a UNIX syslog server, you must configure the syslog daemon on the UNIX server, as described in the section "Configuring the syslog Daemon on UNIX syslog Servers" section. To configure the switch to log messages to a syslog server, perform this task in privileged mode:
This example shows how to add a new syslog server with an IP address of 171.69.192.205 to the system logging server table:
This example shows how to enable system message logging to a configured syslog server:
This example shows how to set the syslog server facility to local0:
This example shows how to set the syslog server severity level to 4:
To remove a syslog server from the configuration, perform this task in privileged mode:
This example shows how to delete the syslog server 171.69.192.207 from the configuration:
To disable logging to the syslog server, perform this task in privileged mode:
This example shows how to disable system message logging to a configured syslog server:
To limit the number of messages buffered, perform this task in privileged mode:
Task | Command | |
---|---|---|
This example shows how to limit to 200 the number of messages stored in the buffer:
To enable or disable the system logging messages timestamp, perform this task in privileged mode:
This example shows how to enable the timestamp display on system logging messages:
By default, system messages are sent to Telnet sessions based on the default facility and severity values.
To configure the logging settings for Telnet sessions, perform one of these tasks in privileged mode:
This example shows how to change the facility and severity values for Telnet login sessions:
This example shows how to disable system message logging to the current Telnet session:
This example shows how to disable system message logging to the console session:
This example shows how to reenable system message logging to the current Telnet session:
This example shows how to reenable system message logging to the console session:
To display the current configuration for system messages, perform this task in privileged mode:
This example shows the results of a show logging command:
To verify the system message log configuration, enter the show logging command. If you are verifying the system message log configuration for the console and the syslog server is disabled, the first five lines of output look as follows:
If you are verifying the system message log configuration for a Telnet login session, an additional line showing the current logging session is displayed, as follows:
To display the first N system messages in the internal buffer of the switch, perform this task in privileged mode:
This example shows how to display the first five messages from the internal buffer:
To display the last N system messages in the internal buffer of the switch, perform this task in privileged mode:
This example shows how to display the last five messages from the internal buffer:
Posted: Sun Jan 19 09:58:41 PST 2003
All contents are Copyright © 1992--2002 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.