1018 CHAPTER 82: INFORMATION CENTER CONFIGURATION
Step 1: Issue the following commands as a root user.
# mkdir /var/log/MyDevice
# touch /var/log/MyDevice/information
Step 2: Edit the file /etc/syslog.conf as a root user and add the following
selector/action pair.
# MyDevice configuration messages
local7.info /var/log/MyDevice/information
n
Be aware of the following issues while editing the /etc/syslog.conf file
■ Comments must be on a separate line and must begin with the # sign.
■ The selector/action pair must be separated with a tab key, rather than a space.
■ No redundant spaces are allowed in the file name.
■ The device name and the accepted severity of the log information specified by
the /etc/syslog.conf file must be identical to those configured on the device
using the info-center loghost or info-center source command; otherwise
the log information may not be output properly to the log host.
Step 3: After the log file information has been created and the /etc/syslog.conf file
has been modified, issue the following commands to display the process ID of
syslogd, terminate a syslogd process, and restart syslogd using the -r option.
# ps -ae | grep syslogd
147
# kill -9 147
# syslogd -r &
n
Ensure that the syslogd process is started with the -r option on a Linux log host.
After the above configurations, the system will be able to keep log information in
the related file.
Outputting Log
Information to the
Console
Network requirements
■ Log information with a severity higher than informational will be output to the
console;
■ The source modules are ARP and IP.
Network diagram
Figure 304 Network diagram for sending log information to the console
Configuration procedure
# Enable information center.
<Sysname> system-view
[Sysname] info-center enable
PC
Console
Device