syslogd.1m (2010 09)
s
syslogd(1M) syslogd(1M)
NAME
syslogd - log system messages
SYNOPSIS
/usr/sbin/syslogd
[-a][-d][
-D][-f configfile][-m markinterval ][
-N][-p logfile ][-r][
-s]
[
-v]
DESCRIPTION
The
syslogd command reads and logs messages into a set of files described by the configuration file
/etc/syslog.conf
.
Options
syslogd recognizes the following options:
-a Allows all messages except consecutive duplicate messages without reordering
them.
-d Turn on debugging.
-D Prevent the kernel from directly printing its messages on the system console.
In this case, syslogd is responsible for routing all kernel messages to their
proper destination.
-f configfile Use configfile instead of /etc/syslog.conf
.
-m markinterval Wait markinterval minutes between mark messages, instead of 20 minutes.
-N Don’t listen to socket.
-p logfile Use logfile instead of /dev/log.
-r Don’t suppress duplicate messages.
-s While logging the messages coming from remote system, IP address will be
logged instead of the hostname.
-v Add priority and facility encoded code at the second field of the message line.
Refer to syslog (3C) manpage for these priority and facility encoding codes.
syslogd creates the file /var/run/syslog.pid
, if possible, containing a single line with its process
ID. This can be used to kill or reconfigure
syslogd.
To kill
syslogd, send it a terminate signal:
kill ‘cat /var/run/syslog.pid‘
To make syslogd, re-read its configuration file, send it a HANGUP
signal:
kill -HUP ‘cat /var/run/syslog.pid‘
syslogd collects messages from the UNIX domain socket /dev/log.un, an Internet domain socket
specified in /etc/services, the named pipe /dev/log, and from the kernel log device /dev/klog.
By default, local programs calling syslog() send log messages to the UNIX domain socket (see
syslog (3C)). If UNIX domain sockets are not configured on the system, they write to the named pipe
instead. If INET domain sockets are not configured, syslogd does not receive messages forwarded from
other hosts, nor does it forward messages (see below).
Each message is one line. A message can contain a priority code and facility code as the second field of
the line. Priorities and Facilities are defined in the header file
<syslog.h>.
When
syslogd is invoked using /sbin/init.d/syslogd script, user can update the required
options in /etc/rc.config.d/syslogd file. By default /etc/rc.config.d/syslogd
contains
-D option. Before starting the syslogd command, the /sbin/init.d/syslogd script recreates
/var/adm/syslog/syslog.log after putting the contents into the file
/var/adm/syslog/OLDsyslog.log. By default, OLDsyslog.log is overwritten by the contents
of syslog.log. If you want to retain the contents of the previous OLDsyslog.log file, configure
PREV_OLDSYSLOG_LINES in /etc/rc.config.d/syslogd. You can set the parameter to the
number of lines (in thousands) to be retained from the previous OLDsyslog.log file. For example, to
retain 20,000 lines from the previous OLDsyslog.log file along with the contents of the previous
syslog.log in the present OLDsyslog.log, put PREV_OLDSYSLOG_LINES=20 in
/etc/rc.config.d/syslogd. By default PREV_OLDSYSLOG_LINES is set to 0.
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1