Outputting log information to a linux log host, Network requirements, Configuration procedure – H3C Technologies H3C WX3000E Series Wireless Switches User Manual
Page 77
68
d.
In the above configuration, local4 is the name of the logging facility used by the log host to
receive logs. info is the information level. The UNIX system will record the log information with
severity level equal to or higher than informational to file /var/log/Device/info.log.
NOTE:
Be aware of the following issues while editing file /etc/syslog.conf:
•
Comments must be on a separate line and begin with the # 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 device by using the info-center loghost and info-center source
commands. Otherwise the log information might not be output properly to the log host.
e.
Display the process ID of syslogd, kill the syslogd process and then restart syslogd using the –r
option to make the modified configuration take effect.
# ps -ae | grep syslogd
147
# kill -HUP 147
# syslogd -r &
After the above configurations, the system is able to record log information into the log file.
Outputting Log Information to a Linux Log Host
Network requirements
Configure the AP 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 25 Network diagram
Configuration procedure
Before the configuration, make sure that AP and PC can reach each other. (Details not shown.)
1.
Configure the AP:
# Enable the information center.
[Sysname] info-center enable
# Specify the log host 1.2.0.1/16, use channel loghost to output log information (optional,
loghost by default), and use local5 as the logging facility.
[Sysname] info-center loghost 1.2.0.1 channel loghost facility local5
# Disable the output of log, trap, and debugging information of all modules on channel loghost.
[Sysname] info-center source default channel loghost debug state off log state off
trap state off
To avoid outputting unnecessary information, disable the output of log, trap, and debugging
information on the specified channel (loghost in this example) before you configure an output rule.