R3303-HP HSR6800 Routers Network Management and Monitoring Configuration Guide

175
Disable the output of unnecessary information of all modules on the specified channel in the output
rule.
2. Configure the log host:
a. Log in to the log host as a root user.
b. Create a subdirectory named Router in the directory /var/log/, and create file info.log in the
Router directory to save logs from the router.
# mkdir /var/log/Router
# touch /var/log/Router/info.log
c. Edit the file syslog.conf in the directory /etc/ and add the following contents.
# Router configuration messages
local5.info /var/log/Router/info.log
In this configuration, local5 is the name of the logging facility used by the log host to receive
logs. info is the information level. The Linux system will record the log information with severity
level equal to or higher than informational to file /var/log/Router/info.log.
NOTE:
Be aware of the following issues while editing file /etc/syslog.conf:
Comments must be on a separate line and must begin with a pound sign (#).
No redundant spaces are allowed after the file name.
The logging facility name and the information level specified in the /etc/syslog.conf file must be
identical to those configured on the router by using the info-center loghost and info-center source
commands. Otherwise the log information might not be output properly to the log host.
d. Display the process ID of syslogd, kill the syslogd process, and then restart syslogd using the –r
option for the configuration to take effect.
# ps -ae | grep syslogd
147
# kill -9 147
# syslogd -r &
Make sure the syslogd process is started with the -r option on a Linux log host.
Now, the system can record log information into the log file.