Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

syslogd - syslog daemon for logging system messages

&pagelevel(3)&pagelevel

The syslog daemon reads and logs messages in logging files in accordance with the definitions in its configuration file (/etc/syslog.conf).

Syntax

syslogd [-Cduv][-f config_file][-l [mode:]path][-m mark_interval]

-C

Logging files which do not yet exist are created (with the rights 0600).

If this option is not specified, the logging files must be created before the syslog daemon is started as the syslog daemon will otherwise not log any messages.

-d

Starts the syslog daemon in debug mode, e.g. to diagnose problems.

-f config_file

Specifies an alternative configuration file; the default configuration file is /etc/syslog.conf.

-m mark_interval

Interval (in minutes) at which the syslog daemon writes so-called MARK messages to the logging file.

These are used to document in the logging file that the syslog daemon is active.

The default setting is 20 minutes, but the output of MARK messages must also be activated in the configuration file.

-l [mode:]path

Path name under which the syslog daemon is to create an additional socket. The path must be specified in absolute terms.

The main task of this option is to create additional log sockets to/var/run/log for different chroot environments. Access rights of the sockets can be specified separately ahead of the socket name in the form of octal numbers separated by a colon (e.g. 0640:/rootjail/var/run/log).

-u

Unique priority logging

This option changes the default value for the relational operator of the priority specification in the configuration file from => to = (see "syslog.conf - syslogd configuration file ").


-v

Verbose logging

This option controls the logging of the origin (facility) and/or weight (priority) of the message. If this option is not specified, neither of the two attributes is logged.

When the option is specified once, the message is prefixed with numerical values of both attributes (e.g. <1.4>).

When the option is specified twice, the message is prefixed with the symbolic values of both attributes (e.g. <user.warn>).

When the option is specified three times, the message is prefixed with the symbolic value of the priority in compatible form (e.g. LOG_WARNING).

Hint

The syslog daemon is started automatically with the -Cvv options by the /etc/rc2.d/S001syslog script when POSIX starts and by default logs all messages in the /var/adm/syslog file. This corresponds to the *.* /var/adm/syslog entry in the configuration file /etc/syslog.conf. Additional or alternative logging files can be defined in this file.

To enable changes to the syslog configuration file to take effect immediately, a hangup signal must be sent to the syslog daemon (e.g. by calling /etc/rc2.d/S001syslog restart). It will then close all logging files, read in the configuration file, and open the logging files contained in the configuration file.

The syslog daemon reads messages from the UNIX domain socket /var/run/log and, if required, from the alternative sockets specified with the –l option.

The syslog daemon creates a /var/run/syslog.pid file which contains its process ID.

The current status of the syslog daemon, its process ID and the logging files used can be determined by calling /etc/rc2.d/S001syslog status.

File

/etc/syslog.conf

Default configuration file

/var/run/syslog.pid

File for the process ID

/var/run/log

Name of the UNIX domain socket

/var/run/logpriv

UNIX domain socket for privileged applications

/var/adm/syslog

Default logging file

/etc/rc2.d/S001syslog

Start script

/etc/rc0.d/K999syslog

Stop script

BS2000

Kernel logging is not supported in the syslog daemon. This is done directly on the BS2000 console.

The following features in the configuration file are not supported and are rejected with a console message:

  • Logging from and to remote hosts (remote syslog daemons)
  • Logging to command pipes or user terminals

Logging to the system console by specifying the LOG_CONS option when the syslog() function is called is not supported. This option is ignored.

Only the system administrator can enable messages to be logged to the BS2000 console or BS2000 CONSLOG file by specifying output file /dev/console or /dev/conslog for the messages concerned.