Cisco Nexus 5000 Series Switch CLI Software Configuration Guide, NX-OS 4.0(1a)N1 (OL-16597-01, January 2009)

Send feedback to nx5000-docfeedback@cisco.com
25-8
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
OL-16597-01
Chapter 25 Configuring System Message Logging
Configuring System Message Logging
Displaying and Clearing Log Files
To display or clear messages in the log file and the NVRAM , perform this task:
The following example shows how to display or clear messages in a log file:
switch# show logging last 40
switch# show logging logfile start-time 2007 nov 1 15:10:0
switch# show logging nvram last 10
switch# clear logging logfile
switch# clear logging nvram
Step 6
switch(config)# logging commit
Commits the pending changes to the syslog server
configuration for distribution to the switches in the
fabric.
switch(config)# logging abort
Cancels the pending changes to the syslog server
configuration.
Step 7
switch(config)# show logging internal
info
(Optional) Displays information about the current
state of syslog server distribution and the last action
taken.
Step 8
switch(config)# copy running-config
startup-config
(Optional) Copies the running configuration to the
startup configuration.
Command Purpose
Command Purpose
Step 1
switch# show logging last number-lines
Displays the last number of lines in the logging file.
You can specify from 1 to 9999 for the last number of
lines.
Step 2
switch# show logging logfile [start-time
yyyy mmm dd hh:mm:ss] [end-time yyyy mmm
dd hh:mm:ss]
Displays the messages in the log file that have a time
stamp within the span entered. If you do not enter an
end time, the current time is used. You enter three
characters for the month time field, and digits for the
year and day time fields.
Step 3
switch# show logging nvram [last
number-lines]
Displays the messages in the NVRAM. To limit the
number of lines displayed, you can enter the last
number of lines to display. You can specify from 1 to
100 for the last number of lines.
Step 4
switch# clear logging logfile
Clears the contents of the log file.
Step 5
switch# clear logging nvram
Clears the logged messages in NVRAM.