2150
C
119: I
HAPTER
NFORMATION
n
Outputting Log
Information to a Linux
Log Host
C
C
ENTER
ONFIGURATION
2 Configuring the log host
The following configurations were performed on SunOS 4.0 which has similar
configurations to the Unix operating systems implemented by other vendors.
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
local4.info
/var/log/MyDevice/information
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 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 three: after the log file information has been created and the configuration
file /etc/syslog.conf has been modified, ensure that the configuration file
/etc/syslog.conf is reread:
# ps -ae | grep syslogd
147
# kill -HUP 147
After the above configurations, the system will be able to keep log information in
the related file.
Network requirements
Send log information to a Linux log host with an IP address of 1.2.0.1/16;
■
Log information with severity higher than informational will be output to the
■
log host;
All modules can output log information.
■
Network diagram
Figure 634 Network diagram for outputting log information to a Linux log host
1.1.0.1/16
Device
1.2.0.1/16
Internet
PC