⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sysklogd.8

📁 制作2.6内核的CLFS时 sysklogd-1.5.tar.gz包
💻 8
📖 第 1 页 / 共 2 页
字号:
.\" Copyright 1994 Dr. Greg Wettstein, Enjellic Systems Development..\" Copyright 2004,6,7 Martin Schulze <joey@infodrom.org>.\" May be distributed under the GNU General Public License.\".TH SYSKLOGD 8 "27 May 2007" "Version 1.5" "Linux System Administration".SH NAMEsysklogd \- Linux system logging utilities..SH SYNOPSIS.B syslogd.RB [ " \-a ".I socket].RB [ " \-d " ].RB [ " \-f ".I config file].RB [ " \-h " ] .RB [ " \-l ".I hostlist].RB [ " \-m ".I interval] .RB [ " \-n " ].RB [ " \-p".IB socket ].RB [ " \-r " ].RB [ " \-s ".I domainlist].RB [ " \-v " ].SH DESCRIPTION.B Sysklogdprovides two system utilities which provide support forsystem logging and kernel message trapping.  Support of both internet andunix domain sockets enables this utility package to support both localand remote logging.System logging is provided by a version of .BR syslogd (8)derived from thestock BSD sources.  Support for kernel logging is provided by the.BR klogd (8)utility which allows kernel logging to be conducted in either astandalone fashion or as a client of syslogd..B Syslogdprovides a kind of logging that many modern programs use.  Every loggedmessage contains at least a time and a hostname field, normally aprogram name field, too, but that depends on how trusty the loggingprogram is.While the.B syslogdsources have been heavily modified a couple of notesare in order.  First of all there has been a systematic attempt toinsure that syslogd follows its default, standard BSD behavior.The second important concept to note is that this version of syslogdinteracts transparently with the version of syslog found in thestandard libraries.  If a binary linked to the standard sharedlibraries fails to function correctly we would like an example of theanomalous behavior.The main configuration file.I /etc/syslog.confor an alternative file, given with the .B "\-f"option, is read at startup.  Any lines that begin with the hash mark(``#'') and empty lines are ignored.  If an error occurs during parsingthe whole line is ignored..SH OPTIONS.TP.BI "\-a " "socket"Using this argument you can specify additional sockets from that.B syslogdhas to listen to.  This is needed if you're going to let some daemonrun within a chroot() environment.  You can use up to 19 additionalsockets.  If your environment needs even more, you have to increasethe symbol.B MAXFUNIXwithin the syslogd.c source file.  An example for a chroot() daemon isdescribed by the people from OpenBSD at<http://www.guides.sk/psionic/dns/>..TP.B "\-d"Turns on debug mode.  Using this the daemon will not proceed a .BR fork (2)to set itself in the background, but opposite to that stay in theforeground and write much debug information on the current tty.  See theDEBUGGING section for more information..TP.BI "\-f " "config file"Specify an alternative configuration file instead of.IR /etc/syslog.conf ","which is the default..TP.BI "\-h "By default syslogd will not forward messages it receives from remote hosts.Specifying this switch on the command line will cause the log daemon toforward any remote messages it receives to forwarding hosts which have beendefined.This can cause syslog loops that fill up hard disks quite fast andthus needs to be used with caution..TP.BI "\-l " "hostlist"Specify a hostname that should be logged only with its simple hostnameand not the fqdn.  Multiple hosts may be specified using the colon(``:'') separator..TP.BI "\-m " "interval"The.B syslogdlogs a mark timestamp regularly.  The default.I intervalbetween two \fI-- MARK --\fR lines is 20 minutes.  This can be changedwith this option.  Setting the.I intervalto zero turns it off entirely.  Depending on other log messagesgenerated these lines may not be written consecutively..TP.B "\-n"Avoid auto-backgrounding.  This is needed especially if the.B syslogdis started and controlled by.BR init (8)..TP.BI "\-p " "socket"You can specify an alternative unix domain socket instead of.IR /dev/log ".".TP.B "\-r"This option will enable the facility to receive message from thenetwork using an internet domain socket with the syslog service (see .BR services (5)).The default is to not receive any messages from the network.This option is introduced in version 1.3 of the sysklogdpackage.  Please note that the default behavior is the opposite ofhow older versions behave, so you might have to turn this on..TP.BI "\-s " "domainlist"Specify a domainname that should be stripped off beforelogging.  Multiple domains may be specified using the colon (``:'')separator.Please be advised that no sub-domains may be specified but only entiredomains.  For example if.B "\-s north.de"is specified and the host logging resolves to satu.infodrom.north.deno domain would be cut, you will have to specify two domains like:.BR "\-s north.de:infodrom.north.de" ..TP.B "\-v"Print version and exit..SH SIGNALS.B Syslogdreacts to a set of signals.  You may easily send a signal to.B syslogdusing the following:.IP.nfkill -SIGNAL `cat /var/run/syslogd.pid`.fi.PP.TP.B SIGHUPThis lets.B syslogdperform a re-initialization.  All open files are closed, theconfiguration file (default is .IR /etc/syslog.conf ")"will be reread and the.BR syslog (3)facility is started again..TP.B SIGTERMThe.B syslogdwill die..TP.BR SIGINT ", " SIGQUITIf debugging is enabled these are ignored, otherwise .B syslogdwill die..TP.B SIGUSR1Switch debugging on/off.  This option can only be used if.B syslogdis started with the.B "\-d"debug option..TP.B SIGCHLDWait for childs if some were born, because of wall'ing messages..SH CONFIGURATION FILE SYNTAX DIFFERENCES.B Syslogduses a slightly different syntax for its configuration file thanthe original BSD sources.  Originally all messages of a specific priorityand above were forwarded to the log file..IPFor example the following line caused ALL output from daemons usingthe daemon facilities (debug is the lowest priority, so every higherwill also match) to go into .IR /usr/adm/daemons :.IP.nf	# Sample syslog.conf	daemon.debug			/usr/adm/daemons.fi.PPUnder the new scheme this behavior remains the same.  The differenceis the addition of four new specifiers, the asterisk (\fB*\fR)wildcard, the equation sign (\fB=\fR), the exclamation mark(\fB!\fR), and the minus sign (\fB-\fR).The \fB*\fR specifies that all messages for thespecified facility are to be directed to the destination.  Note thatthis behavior is degenerate with specifying a priority level of debug.Users have indicated that the asterisk notation is more intuitive.The \fB=\fR wildcard is used to restrict logging to the specified priorityclass.  This allows, for example, routing only debug messages to aparticular logging source..IPFor example the following line in.I syslog.confwould direct debug messages from all sources to the.I /usr/adm/debugfile..IP.nf	# Sample syslog.conf	*.=debug			/usr/adm/debug.fi.PP.\" The \fB!\fR as the first character of a priority inverts the above.\" mentioned interpretation.The \fB!\fR is used to exclude logging of the specifiedpriorities.  This affects all (!) possibilities of specifying priorities..IPFor example the following lines would log all messages of the facilitymail except those with the priority info to the.I /usr/adm/mail file.  And all messages from news.info (including) to news.crit(excluding) would be logged to the.I /usr/adm/newsfile..IP.nf	# Sample syslog.conf	mail.*;mail.!=info		/usr/adm/mail	news.info;news.!crit	/usr/adm/news.fi.PPYou may use it intuitively as an exception specifier.  The abovementioned interpretation is simply inverted.  Doing that you may use.nf	mail.none.fior.nf	mail.!*.fior.nf	mail.!debug.fito skip every message that comes with a mail facility.  There is muchroom to play with it. :-)The \fB-\fR may only be used to prefix a filename if you want to omitsync'ing the file after every write to it.This may take some acclimatization for those individuals used to thepure BSD behavior but testers have indicated that this syntax issomewhat more flexible than the BSD behavior.  Note that these changesshould not affect standard.BR syslog.conf (5)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -