Question & Answer
Question
How to configure a syslog server and client.
Answer
Setting up the syslog server where the clients will send and log messages.
- Edit /etc/syslog.conf configuration file and add the following entry:
# vi /etc/syslog.conf
*.debug /tmp/debug.out
- Create the log file where syslog will log the messages:
# touch /tmp/debug.out
- Check if syslog is active. If it is not active start it.
# lssrc -s syslogd
Subsystem Group PID Status
syslogd ras active
If syslog is active, then refresh the daemon to read the new configuration.
# refresh -s syslogd
If syslog is not active then start it using SRC.
# startsrc -s syslogd
Setting up the syslog client.
# vi /etc/syslog.conf
*.debug @<ip-addrs-of-syslog-server>
- Check if syslog is active. If it is not active start it.
# lssrc -s syslogd
Subsystem Group PID Status
syslogd ras active
If syslog is active, then refresh the daemon to read the new configuration.
# refresh -s syslogd
If syslog is not active then start it using SRC.
# startsrc -s syslogd
- Test the configuration using the logger command on syslog client.
# logger "test message"
You should get an entry in the syslog server under /tmp/debug.out
similar to the following:
Aug 14 16:52:07 bonesbso user:notice Message forwarded from bonesbso: root: test message
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
isg3T1018834