20-11
Cisco Systems IntelligentGigabit Ethernet Switch Modules for the IBM BladeCenter, Software Configuration Guide
24R9746
Chapter20 Configuring System Messa ge Logging
Configuring System Message Logging
Logging Messages to a UNIX Syslog Daemon
Before you can send system log messages to a UNIX syslog server, you must configure the syslog
daemon on a UNIX server. Log in as root, and perform these steps:
Note Some recent versions of UNIX syslog daemons no longer accept by default syslog packets from the
network. If this is the case with your system, use the UNIX man syslogd command to determine what
options must be added to or removed from the syslog command line to enable logging of remote syslo g
messages.
Step1 Add a line such as the following to the file /etc/syslog.conf:
local7.debug /usr/adm/logs/switch.
log
The local7 keyword specifies the logging facility to be used; see Table20- 4 on page 20-12 for
information on the facilities. The debug keyword specifies the syslog level; see Table20-3 on page 20-9
for information on the severity levels. The syslog daemon sends messages at this level or at a more severe
level to the file specified in the next field. The file must already exist, and the syslog daemon must have
permission to write to it.
Step2 Create the log file by entering these commands at the UNIX shell prompt:
$ touch /var/log/switch.log
$ chmod 666 /var/log/switch.log
Step3 Make sure the syslog daemon reads the new changes:
$ kill -HUP `cat /etc/syslog.pid`
For more information, see the man syslog.conf and man syslogd commands on your UNIX system.
Configuring the UNIX System Logging Facility
When sending system log messages to an external device, you can cause the switch to identify its
messages as originating from any of the UNIX syslog facilities.
Beginning in privileged EXEC mode, follow these steps to configure UNIX system facility message
logging:
Command Purpose
Step1 configure terminal Enter global configuration mode.
Step2 logging host Log messages to a UNIX syslog server host by entering its IP address.
To build a list of syslog servers that receive logging messages, enter this
command more than once.
Step3 logging trap level Limit messages logged to the syslog servers.
Be default, syslog servers receive informational messages and lower. See
Table20-3 on pa ge 20-9 for level keywords.