IBM Support

How to setup a basic syslog server and client for remote logging.

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

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"APARs - AIX 6.1 environment","Platform":[{"code":"PF002","label":"AIX"}],"Version":"5.3;6.1;7.1","Edition":"Advanced;Enterprise;Personal;Standard;Workgroup;Workstation","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

More support for:
AIX

Software version:
5.3, 6.1, 7.1

Operating system(s):
AIX

Document number:
676945

Modified date:
17 June 2018

UID

isg3T1018834

Manage My Notification Subscriptions