About System Message Logging
About System Message Logging
C H A P T E R 14
Configuring System Message Logging
This chapter describes how to configure system message logging on the Cisco MDS 9020 Fabric Switch.
It includes the following sections:
• About System Message Logging, page 14-1
• System Message Logging Configuration, page 14-3
• Displaying System Message Logging Information, page 14-5
• Default Settings, page 14-7
Note When the switch first initializes, the network is not connected until initialization completes. Therefore,
messages are not redirected to a system message logging server for a few seconds.
Table 14-1 describes some samples of the facilities supported by the system message logs.
Cisco MDS 9020 Fabric Switch Configuration Guide and Command Reference
OL-6988-03 14-1
Chapter 14 Configuring System Message Logging
About System Message Logging
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 ck - d o c @ c i s c o . c o m .
Table 14-2 describes the severity levels supported by the system message logs.
Note Refer to the Cisco MDS 9020 Fabric Switch System Messages Reference for details on the error log
message format.
Cisco MDS 9020 Fabric Switch Configuration Guide and Command Reference
14-2 OL-6988-03
Chapter 14 Configuring System Message Logging
System Message Logging Configuration
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 ck - d o c @ c i s c o . c o m .
Command Purpose
Step 1 switch# config t Enters configuration mode.
switch(config)#
Step 2 switch(config)# logging level all 4 Configures Telnet or SSH logging for the all facilities at
level 4 (warning). As a result, logging messages with a
severity level of 4 or above are displayed.
Log Files
You can display the log file using the show logging logfile command.
Note As shown in this example, you must add five tab characters between local0.debug and
/var/log/myfile.log. Refer to entries in the /etc/syslog.conf file for further examples.
The switch sends messages based on the specified facility types and severity levels. The local0 keyword
specifies the UNIX logging facility; local0 is the only facility type that Cisco FabricWare supports. 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.
Step 2 Create the log file by entering these commands at the UNIX shell prompt:
$ touch /var/log/myfile.log
$ chmod 666 /var/log/myfile.log
Step 3 Make sure the system message logging daemon reads the new changes by entering this command:
$ kill -HUP ~cat /etc/syslog.pid~
Cisco MDS 9020 Fabric Switch Configuration Guide and Command Reference
OL-6988-03 14-3
Chapter 14 Configuring System Message Logging
System Message Logging Configuration
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 ck - d o c @ c i s c o . c o m .
Command Purpose
Step 1 switch# config t Enters configuration mode.
switch#
Step 2 switch(config)# logging server Configures the switch to forward log messages according
172.22.00.00 to the specified facility types and severity levels to remote
multiple servers specified by its hostname or IP address
(172.22.00.00).
switch(config)# no logging server Removes the specified server (172.16.00.00) and reverts to
172.16.00.00 factory default.
Standard or Cisco
Facility Keyword Description MDS Specific
auth Authorization system Standard
authpriv Authorization (private) system Standard
cron Cron or at facility Standard
daemon System daemons Standard
ftp File Transfer Protocol Standard
kernel Kernel Standard
local0 to local7 Locally defined messages Standard (local7 is the
default)
lpr Line printer system Standard
mail Mail system Standard
news USENET news Standard
syslog Internal system messages Standard
user User process Standard
uucp UNIX-to-UNIX Copy Program Standard
Note The only facility type that Cisco FabricWare supports is local0.
Cisco MDS 9020 Fabric Switch Configuration Guide and Command Reference
14-4 OL-6988-03
Chapter 14 Configuring System Message Logging
Displaying System Message Logging Information
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 ck - d o c @ c i s c o . c o m .
Cisco MDS 9020 Fabric Switch Configuration Guide and Command Reference
OL-6988-03 14-5
Chapter 14 Configuring System Message Logging
Displaying System Message Logging Information
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 ck - d o c @ c i s c o . c o m .
Cisco MDS 9020 Fabric Switch Configuration Guide and Command Reference
14-6 OL-6988-03
Chapter 14 Configuring System Message Logging
Default Settings
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 ck - d o c @ c i s c o . c o m .
Default Settings
Table 14-4 lists the default settings for system message logging.
Parameters Default
System message logging to the console Enabled for messages at the critical severity level.
System message logging to Telnet sessions Disabled.
Logging file size 1200 entries.
Log file name Message (change to a name with up to 200 characters).
Logging server Disabled.
Syslog server IP address Not configured.
Number of servers Three servers.
Server facility Local 7.
Cisco MDS 9020 Fabric Switch Configuration Guide and Command Reference
OL-6988-03 14-7
Chapter 14 Configuring System Message Logging
Default Settings
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 ck - d o c @ c i s c o . c o m .
Cisco MDS 9020 Fabric Switch Configuration Guide and Command Reference
14-8 OL-6988-03