rsyslogd Daemon

Purpose

Logs system messages.

Description

The rsyslogd daemon reads a socket and sends the message line to a destination that is specified by the /etc/rsyslog.conf configuration file. The rsyslogd daemon reads the configuration file when it is activated. You can start the rsyslogd daemon from the source master by using the following commands:

startsrc -s syslogd
stopsrc -s syslogd

The startsrc option starts the rsyslogd daemon. To start multiple rsyslogd daemons, run the startsrc option repeatedly with a new pid file by using the -i command-line option. The startsrc command specifies the arguments for the rsyslogd daemon by using the startsrc -a flag. The arguments must be protected from interpretation by the shell with double quotation marks.

The stopsrc option stops all instances of the rsyslogd daemon. To stop a specific instance, you must specify the -p <pid> option.
stopsrc -p <pid of syslogd daemon>
Default logging application:

After the rsyslogd daemon is installed, it cannot be started immediately and syslogd daemon continues to be used to log system messages. To configure the rsyslogd daemon to log messages by default, run the syslog_ssw script by using the -r option.

After the rsyslogd daemon is configured to log system messages, the rsyslogd daemon starts with a default command-line argument of -c5. This option ensures that the rsyslogd daemon starts in a normal mode and is not compatible with an earlier version.

Default rsyslog.conf file:

To configure and use the rsyslogd daemon, see the reference section of the documentation.

After installation, the default /etc/rsyslog.conf configuration file has the following information:
################################################################
# Rsyslog is free software: it is distributed under the          #
# terms of the GNU General Public License as published by        #
# the Free Software Foundation, under version 3 of the License.  #
#                                                                #
# if you experience problems, check                              #
# http://www.rsyslog.com/doc/troubleshoot.html for assistance    #
#                                                                #
# Load the UNIX socket for local communication                   #
  $ModLoad imuxsock                                              #
#                                                                #
# Load the UDP module for remote communication                   #
  $ModLoad imudp                                                 #
#                                                                #
# Run the UDP server on the default port 514                     #
  $UDPServerRun 514                                              #
#                                                                #
################################################################

Almost all parameters in the syslog.conf file functions with the rsyslogd daemon except for the AIX® specific parameters such as pureScale® API support. To convert a syslog.conf file into a supported rsyslog.conf file, the switching script must be used with the-c option.

Switching script usage

syslog_ssw [ -r | -s | -c SourceSyslogConffile DestRsyslogConffile ]
Item Descriptor
-r Switch to rsyslog daemon as the default logging application.
-s Switch to syslog daemon as the default logging application.
-c Convert configuration rules in the syslog.conf file to the rules in the rsyslog.conf file. However, the AIX specific parameters that are not understood by the rsyslogd daemon are removed during conversion.

When you switch the default logging application by using the -r or the -s option, this choice remains persistent across restart.

The startsrc -s syslogd command starts the rsyslogd or the syslogd daemon that is based on the default logging application that is set.

The syslog_ssw script is not present by default, and is available after the rsyslogd daemon is installed.

Examples

  1. To stop the existing syslogd daemon and to start the rsyslogd daemon, run the following command:
    syslog_ssw -r
    
  2. To stop the existing rsyslogd daemon and to start the syslogd daemon, run the following command:
    syslog_ssw -s
  3. To convert the syslog.conf file to rsyslog.conf file, and to create an rsyslog.conf file if the file does not exist, run the following command:
    syslog_ssw -c syslog.conf rsyslog.conf
    This conversion removes the AIX specific parameters and allows the newly created file to be used with the rsyslogd daemon.
  4. To start the default logging application, run the following command:
    startsrc -s syslogd
    The default logging application can be the syslogd daemon or the rsyslogd daemon.

Files

Item Descriptor
/etc/rsyslog.conf Controls the output of the rsyslogd daemon.
/var/run/rsyslogd.pid Contains the process ID.