S e n d d o c u m e n t a t i o n c o m m e n t s t o m d s f e e d b a c k - d o c @ c i s c o . c o m
53-6
Cisco MDS 9000 Family CLI Configuration Guide
OL-16184-01, Cisco MDS SAN-OS Release 3.x
Chapter 53 Configuring System Message Logging
System Message Logging Configuration
Log Files
Logging messages can be saved to a log file. You can configure the name of this file and restrict its size
as required. The default log file name is messages. The file name can have up to 80 characters and the
file size ranges from 4096 bytes to 4194304 bytes.
To send log messages to a file, follow these steps:
Note
You can rename the log file using the
logging logfile
command.
The configured log file is saved in the /var/log/external directory. The location of the log file cannot be
changed. You can use the
show logging logfile
and
clear logging logfile
commands to view and delete
the contents of this file. You can use the
dir log:
command to view logging file statistics. You can use
the
delete log:
command to remove the log file.
You can copy the logfile to a different location using the
copy log:
command using additional copy
syntax (see the
“Copying Configuration Files” section on page 8-5
).
System Message Logging Servers
You can configure a maximum of three system message logging servers.
To send log messages to a UNIX system message logging server, you must configure the system message
logging daemon on a UNIX server. Log in as root, and follow these steps:
Step 1
Add the following line to the /etc/syslog.conf file.
local1.debug /var/log/
myfile
.
log
Note
Be sure to add five tab characters between
local1.debug
and
/var/log/
myfile
.log
. Refer to entries
in the /etc/syslog.conf file for further examples.
Command
Purpose
Step 1
switch#
config t
switch(config)#
Enters configuration mode.
Step 2
switch(config)#
logging logfile
messages 3
Configures logging of information for errors or events above with
a severity level 3 or above to the default log file named messages.
switch(config)#
logging logfile
ManagerLog 3
Configures logging of information for errors or events with a
severity level 3 or above to a file named ManagerLog using the
default size of 10,485,760 bytes.
switch(config)#
logging logfile
ManagerLog 3 size 3000000
Configures logging information for errors or events with a
severity level 3 or above to a file named ManagerLog. By
configuring a size, you are restricting the file size to 3,000,000
bytes.
switch(config)#
no logging
logfile
Disables logging messages to the logfile.