cisco · 14 стр.

Cisco Catalyst 2960: Настройка журналов системных сообщений - Руководство по эксплуатации и обслуживанию PDF (EN)

Оригинальное название: Cisco Catalyst 2960: Настройка журналов системных сообщений - Руководство по эксплуатации и обслуживанию PDF

Читать онлайн

Похожие инструкции

Содержание

Текст документа

System Messsage Logging

Configuring System Message Logs Information About Configuring System Message Logs, on page 1 How to Configure System Message Logs, on page 4 Monitoring and Maintaining System Message Logs, on page 12 Configuration Examples for System Message Logs, on page 12 Additional References for System Message Logs, on page 13 Feature History for System Message Logs, on page 13 Information About Configuring System Message Logs System Messsage Logging By default, a switch sends the output from system messages and debug privileged EXEC commands to a logging process. .

The logging process controls the distribution of logging messages to various destinations, such as the logging buffer, terminal lines, or a UNIX syslog server, depending on your configuration. The process also sends messages to the console. When the logging process is disabled, messages are sent only to the console. The messages are sent as they are generated, so message and debug output are interspersed with prompts or output from other commands. Messages appear on the active consoles after the process that generated them has finished. You can set the severity level of the messages to control the type of messages displayed on the consoles and each of the destinations.

You can time-stamp log messages or set the syslog source address to enhance real-time debugging and management. For information on possible messages, see the system message guide for this release. You can access logged system messages by using the switch command-line interface (CLI) or by saving them to a properly configured syslog server. The switch software saves syslog messages in an internal buffer on a standalone switch. If a standalone switch , the log is lost unless you had saved it to flash memory.

You can remotely monitor system messages by viewing the logs on a syslog server or by accessing the switch through Telnet, through the console port, or through the Ethernet management port. The syslog format is compatible with 4.3 BSD UNIX. Note Configuring System Message Logs 1

Стр. 1

System Log Message Format

System Log Message Format System log messages can contain up to 80 characters and a percent sign (%), which follows the optional sequence number or time-stamp information, if configured. Depending on the switch, messages appear in one of these formats: seq no:timestamp: %facility-severity-MNEMONIC:description (hostname-n) seq no:timestamp: %facility-severity-MNEMONIC:description The part of the message preceding the percent sign depends on the setting of these global configuration commands: service sequence-numbers service timestamps log datetime service timestamps log datetime [ localtime ] [ msec ] [ show-timezone ] service timestamps log uptime Table 1:

System Log Message Elements Configuring System Message Logs System Log Message Format Element Description seq no: Stamps log messages with a sequence number only if the service sequence-numbers global configuration command is configured. timestamp formats: mm/dd h h:mm:ss or hh:mm:ss (short uptime) or d h (long uptime) Date and time of the message or event. This information appears only if the service timestamps log [datetime | log] global configuration command is configured. facility The facility to which the message refers (for example, SNMP, SYS, and so forth). severity Single-digit code from 0 to 7 that is the severity of the message.

MNEMONIC Text string that uniquely describes the message. description Text string containing detailed information about the event being reported. hostname-n Hostname of a stack member and its switch number in the stack. Though the active switch is a stack member, it does not append its hostname to system messages. Configuring System Message Logs 2

Стр. 2

Syslog Message Limits

Default System Message Logging Settings Table 2: Default System Message Logging Settings Syslog Message Limits If you enabled syslog message traps to be sent to an SNMP network management station by using the snmp-server enable trap global configuration command, you can change the level of messages sent and stored in the switch history table. You also can change the number of messages that are stored in the history table. Messages are stored in the history table because SNMP traps are not guaranteed to reach their destination. By default, one message of the level warning and numerically lower levels are stored in the history table even if syslog traps are not enabled.

When the history table is full (it contains the maximum number of message entries specified with the logging history size global configuration command), the oldest message entry is deleted from the table to allow the new message entry to be stored. The history table lists the level keywords and severity level. For SNMP usage, the severity level values increase by 1. For example, emergencies equal 1, not 0, and critical equals 3, not 2. Configuring System Message Logs Default System Message Logging Settings Feature Default Setting System message logging to the console Enabled. Console severity Debugging. Logging file configuration No filename specified. Logging buffer size 102400 bytes.

Logging history size 1 message. Time stamps Disabled. Synchronous logging Disabled. Logging server Disabled. Syslog server IP address None configured. Server facility Local7 Server severity Informational. Configuring System Message Logs 3

Стр. 3

Setting the Message Display Destination Device

How to Configure System Message Logs Setting the Message Display Destination Device If message logging is enabled, you can send messages to specific locations in addition to the console. This task is optional. Procedure Configuring System Message Logs How to Configure System Message Logs Command or Action Purpose Step 1 configure terminal Example: Device# configure terminal Enters global configuration mode. Step 2 logging buffered [size] Example: Device(config)# logging buffered 8192 Logs messages to an internal buffer on the switch. The range is 4096 to 2147483647 bytes. The default buffer size is 102400 bytes.

If a standalone switchfails, the log file is lost unless you previously saved it to flash memory. See Step 4. Note Do not make the buffer size too large because the switch could run out of memory for other tasks. Use the show memory privileged EXEC command to view the free processor memory on the switch. However, this value is the maximum available, and the buffer size should not be set to this amount. Step 3 logging host Example: Device(config)# logging 125.1.1.100 Logs messages to a UNIX syslog server host. host specifies the name or IP address of the host to be used as the syslog server. To build a list of syslog servers that receive logging messages, enter this command more than once.

Step 4 logging file flash: filename [max-file-size [min-file-size]] [severity-level-number | type] Example: Device(config)# logging file flash:log msg.txt 40960 4096 3 _ Stores log messages in a file in flash memory on a standalone switch. • filename—Enters the log message filename. • (Optional) max-file-size —Specifies the maximum logging file size. The range is Configuring System Message Logs 4

Стр. 4