You are on page 1of 2

###########################  * (all or any) & none

# SYSLOG NOTES
########################### Actions:
###########################  filename
# SYSLOG STARTUP OPTIONS  @hostname
###########################  @ipaddress
-r flag used to accept messages from remote machines  user1
 *
-h flag allows syslog to send messages to a remote machine  - symbol in front of file means synchronization & buffering

kill –HUP `/bin/cat /var/run/syslog.pid` Examples:


# Enable remote logging
########################### *.* @192.168.0.3
# SYSLOG.CONF FILE *.* @server4.bandwidthco.com
###########################
Syntax: selector <TAB> action # enable this, if you want that root is informed
selector = facility.level *.alert root
action = where to log
# all email-messages in one file
Facilities (Programs): mail.* /var/log/mail
 kern
 user (default) # email in separate files
 mail mail.info /var/log/mail.info
 daemon mail.warn /var/log/mail.warn
 auth mail.err /var/log/mail.err
 lpr
 news # Warnings in one file
 uucp *.=warn;*.=err /var/log/warn
 cron *.crit /var/log/warn
 mark
 local0-7 # save the rest in one file
 syslog *.*;mail.none;news.none /var/log/messages
 authpriv *.* /var/log/allmessages
 ftp
 * (all or any) & none ###########################
# LOGGER COMMAND
Levels (Severity): ###########################
 emerg Syntax: logger –p facility.level –t tag message | file filename
 alert
 crit -p option = facility and severity level
 err -t option = identifying tag in message
 warning -I option = include process ID in message
 notice
 info Example:
 debug logger –I –p local1.err –t FFT “Job Failed – scratch disk full”

Revised January 25, 2009 Mark E. Donaldson Page 1 of 2


Revised January 25, 2009 Mark E. Donaldson Page 2 of 2

You might also like