Outputting log information to a linux log host, Network requirements, Configuration procedure – H3C Technologies H3C WX5500E Series Access Controllers User Manual
Page 60

52
# ps -ae | grep syslogd
147
# kill -HUP 147
# syslogd -r &
Now, the system can record log information into the log file.
Outputting log information to a Linux log host
Network requirements
Configure the device to send log information that has a severity level of at least informational to the Linux
log host at 1.2.0.1/16.
Figure 20 Network diagram
Configuration procedure
Before the configuration, make sure that the device and the log host can reach other. (Details not shown.)
1.
Configure the device:
# Enable the information center.
[Sysname] info-center enable
# Specify the host 1.2.0.1/16 as the log host, use the channel loghost to output log information
(optional, loghost by default), and specify local5 as the logging facility.
[Sysname] info-center loghost 1.2.0.1 channel loghost facility local5
# Configure an output rule to output to the log host the log information that has a severity level of
at least informational.
[Sysname] info-center source default channel loghost log level informational state
on debug state off trap state off
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 Device in the directory /var/log/, and then create the file
info.log in the Device directory to save logs of Device.
# mkdir /var/log/Device
# touch /var/log/Device/info.log
c.
Edit the file syslog.conf in the directory /etc/ and add the following content.
# Device configuration messages
local5.info /var/log/Device/info.log
In this configuration, local5 is the name of the logging facility that the log host uses to receive
logs. The information level is info. The Linux system records the log information that has a
severity level of at least informational to the file /var/log/Device/info.log.