syslogd [ -d ] [ -s ] [ -f ConfigurationFile ] [ -m MarkInterval ] [-r]
The syslogd daemon reads a datagram socket and sends each message line to a destination described by the /etc/syslog.conf configuration file. The syslogd daemon reads the configuration file when it is activated and when it receives a hangup signal.
The syslogd daemon creates the /etc/syslog.pid file, which contains a single line with the command process ID used to end or reconfigure the syslogd daemon.
A terminate signal sent to the syslogd daemon ends the daemon. The syslogd daemon logs the end-signal information and terminates immediately.
Each message is one line. A message can contain a priority code, marked by a digit enclosed in < > (angle braces) at the beginning of the line.
The /usr/include/sys/syslog.h include file defines the facility and priority codes used by the configuration file. Locally written applications use the definitions contained in the syslog.h file to log messages via the syslogd daemon.
The configuration file informs the syslogd daemon where to send a system message, depending on the message's priority level and the facility that generated it.
If you do not use the -f flag, the syslogd daemon reads the default configuration file, the /etc/syslog.conf file.
The syslogd daemon ignores blank lines and lines beginning with a # (pound sign).
Lines in the configuration file for the syslogd daemon contain a selector field and an action field, separated by one or more tabs.
The selector field names a facility and a priority level. Separate facility names with a , (comma). Separate the facility and priority-level portions of the selector field with a . (period). Separate multiple entries in the same selector field with a ; (semicolon). To select all facilities, use an * (asterisk).
The action field identifies a destination (file, host, or user) to receive the messages. If routed to a remote host, the remote system will handle the message as indicated in its own configuration file. To display messages on a user's terminal, the destination field must contain the name of a valid, logged-in system user.
Use the following system facility names in the selector field:
Use the following message priority levels in the selector field. Messages of the specified priority level and all levels above it are sent as directed.
Priority Level | Description |
---|
Use the following message destinations in the action field.
Destination | Description |
---|---|
File Name | Full path name of a file opened in append mode |
@Host | Host name, preceded by @ (at sign) |
User[, User][...] | User names |
* | All users |
mail.debug /tmp/mailsyslog
*.debug;mail.none @rigil
*.emerg;mail,daemon.crit nick, jam
mail.debug *
/etc/syslog.conf | Controls the output of syslogd. |
/etc/syslog.pid | Contains the process ID. |
The syslog subroutine.