以下に含まれるその他のドキュメントサポート リソース | PDF 文書ファイルをダウンロードする (5547 KB)
syslogd(1M)NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | FILES | ATTRIBUTES | SEE ALSO | NOTES NAME
SYNOPSIS
DESCRIPTION
syslogd reads and forwards system messages to the appropriate log files or users, depending upon the priority of a message and the system facility from which it originates. The configuration file /etc/syslog.conf (see syslog.conf(4)) controls where messages are forwarded. syslogd logs a mark (timestamp) message every markinterval minutes (default 20) at priority LOG_INFO to the facility whose name is given as mark in the syslog.conf file. A system message consists of a single line of text, which may be prefixed with a priority code number enclosed in angle-brackets (< >); priorities are defined in <sys/syslog.h>. syslogd reads from the STREAMS log driver, /dev/log, and from any transport provider specified in /etc/netconfig, /etc/net/transport/hosts, and /etc/net/transport/services. syslogd reads the configuration file when it starts up, and again whenever it receives a HUP signal (see signal(3HEAD), at which time it also closes all files it has open, re-reads its configuration file, and then opens only the log files that are listed in that file. syslogd exits when it receives a TERM signal. As it starts up, syslogd creates the file /etc/syslog.pid, if possible, containing its process identifier (PID). If message ID generation is enabled (see log(7D)), each message will be preceded by an identifier in the following format: [ID msgid facility.priority]. msgid is the message's numeric identifier described in msgid(1M). facility and priority are described in syslog.conf(4). [ID 123456 kern.notice] is an example of an identifier when message ID generation is enabled. If the message originated in a loadable kernel module or driver, the kernel module's name (for example, ufs) will be displayed instead of unix. See EXAMPLES for sample output from syslogd with and without message ID generation enabled. In an effort to reduce visual clutter, message IDs are not displayed when writing to the console; message IDs are only written to the log file. See EXAMPLES. The /etc/default/syslogd file contains the following default parameter settings. See FILES. OPTIONS
The following options are supported: EXAMPLESExample 1 syslogd Output Without Message ID Generation EnabledThe following example shows the output from syslogd when message ID generation is not enabled:
Example 2 syslogd Output with ID generation EnabledThe following example shows the output from syslogd when message ID generation is enabled. The message ID is displayed when writing to log file/var/adm/messages.
Example 3 syslogd Output with ID Generation EnabledThe following example shows the output from syslogd when message ID generation is enabled when writing to the console. Even though message ID is enabled, the message ID is not displayed at the console.
FILES
ATTRIBUTESSee attributes(5) for descriptions of the following attributes:
SEE ALSONOTESThe mark message is a system time stamp, and so it is only defined for the system on which syslogd is running. It can not be forwarded to other systems. When syslogd receives a HUP signal, it attempts to complete outputting pending messages, and close all log files to which it is currently logging messages. If, for some reason, one (or more) of these files does not close within a generous grace period, syslogd discards the pending messages, forcibly closes these files, and starts reconfiguration. If this shutdown procedure is disturbed by an unexpected error and syslogd cannot complete reconfiguration, syslogd sends a mail message to the superuser on the current system stating that it has shut down, and exits. Care should be taken to ensure that each window displaying messages forwarded by syslogd (especially console windows) is run in the system default locale (which is syslogd's locale). If this advice is not followed, it is possible for a syslog message to alter the terminal settings for that window, possibly even allowing remote execution of arbitrary commands from that window. NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | FILES | ATTRIBUTES | SEE ALSO | NOTES |
|||||||