Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Cisco Switching Black Book - Sean Odom, Hanson Nottingham.pdf
Скачиваний:
87
Добавлен:
24.05.2014
Размер:
2.89 Mб
Скачать

You can use the logging timestamps in your system logging to help you keep track of when events happen. To enable the logging time stamp, use the following command in Privileged mode:

Catalyst5000> (enable) set logging timestamp enable

System logging messages timestamp will be enabled.

Catalyst5000> (enable)

Disabling the Logging Time Stamp on a Set/Clear Command−Based Switch

To disable the logging time stamp, use the following command in Privileged mode:

Catalyst5000> (enable) set logging timestamp disable

System logging messages timestamp will be disabled.

Catalyst5000> (enable)

Configuring the Logging Buffer Size on a Set/Clear Command−Based Switch

By default, the logging buffer will hold 1,024 messages in memory. If you do not want to keep this many in memory, either to conserve memory or because they are not needed, use the set logging buffer command followed by the net buffer size:

set logging buffer 2048

Clearing the Server Logging Table

To clear a syslog server table, use the clear logging server command followed by the server IP address:

Catalyst5000> (enable) clear logging server 63.78.39.164

System logging server 63.78.39.164 removed from system logging server table.

Catalyst5000> (enable)

Disabling Server Logging

The set logging server disable command disables system logging to all configured system logging servers:

Catalyst5000> (enable) set logging server disable

System logging messages will not be sent to the configured syslog servers.

Catalyst5000> (enable)

85

Displaying the Logging Configuration

Use the show logging command to display the current system message logging configuration. Use the no alias keyword to display the IP addresses instead of the host names of the configured syslog servers.

This output shows how to display the current system message logging configuration:

Catalyst5000> (enable) show logging

Logging buffered size:

500

 

timestamp option:

enabled

Logging history size:

1

 

Logging console:

enabled

Logging server:

disabled

server facility:

LOCAL7

server severity:

warnings(4)

Facility

Default Severity

Current Session Severity

——————

————————————————

————————————————————————

acl

2

 

2

cdp

4

 

4

cops

2

 

2

dtp

5

 

5

dvlan

2

 

2

earl

2

 

2

filesys

2

 

2

gvrp

2

 

2

ip

2

 

2

kernel

2

 

2

ld

2

 

2

mcast

2

 

2

mgmt

5

 

5

mls

5

 

5

pagp

5

 

5

protfilt

2

 

2

pruning

2

 

2

privatevlan

2

 

2

qos

2

 

2

radius

2

 

2

rsvp

2

 

2

security

2

 

2

snmp

2

 

2

spantree

2

 

2

sys

5

 

5

tac

2

 

2

tcp

2

 

2

telnet

2

 

2

tftp

2

 

2

udld

4

 

4

vtp

2

 

2

0(emergencies)

1(alerts)

2(critical)

3(errors)

4(warnings)

5(notifications)

6(information)

7(debugging)

 

Catalyst5000> (enable)

Displaying System Logging Messages

You can use the show logging buffer command to display the messages in the switch logging buffer. If you

86

do not specify the number of messages, the default is to display the last 20 messages in the buffer (−20).

To display the first five messages in the buffer, use the following code:

Catalyst5000> (enable) show logging buffer 5

2000 Aug 21 09:41:12 %SYS−5−MOD_OK:Module 1 is online 2000 Aug 21 09:41:14 %SYS−5−MOD_OK:Module 3 is online 2000 Aug 21 09:41:14 %SYS−5−MOD_OK:Module 2 is online

2000 Aug 21 09:42:16 %PAGP−5−PORTTOSTP:Port 2/1 joined bridge port 2/1 2000 Aug 21 09:42:16 %PAGP−5−PORTTOSTP:Port 2/2 joined bridge port 2/2 Catalyst5000> (enable)

To display the last five messages in the buffer, use this code:

Catalyst5000> (enable) show logging buffer −5 %PAGP−5−PORTFROMSTP:Port 3/1 left bridge port 3/1 %SPANTREE−5−PORTDEL_SUCCESS:3/2 deleted from vlan 1 (PAgP_Group_Rx) %PAGP−5−PORTFROMSTP:Port 3/2 left bridge port 3/2 %PAGP−5−PORTTOSTP:Port 3/1 joined bridge port 3/1−2 %PAGP−5−PORTTOSTP:Port 3/2 joined bridge port 3/1−2

Catalyst5000> (enable)

87

Соседние файлы в предмете Программирование