Syslogsangjung.woo@gmail.com
SyslogStandardfor logging program messagesGenerating log from both kernel and appStoring log into files, named pipes, remote hosts and specific usersBoth of themprintk/klog for kernel eventsyslogd for app event
Syslog usageJava App 1Java App 2MusicVideo PlayerMultimedia FWJVMKernel- Critical Message- Warning- Information- *(Everything)- Critical Message- Warning- Information
Syslog configurationSyslogd default conf file/etc/syslog.confSelector + ActionSector: Facility + PriorityAction: Write destination
Syslog configuration – con’dPriority (/usr/include/sys/syslog.h)emergalertcriterrwarningnoticeInfodebug
Syslog configuration – con’dPredefined facility (/usr/include/sys/syslog.h)kernmaildeamonauthnewsftpuser0~user7
SyslogdRestart syslog daemonsudo /etc/init.d/sysklogdrestart/etc/init.d/sysklogd status
ExampleModify syslog.confUser level code
Example – con’dLog message
ExtensionSyslog configurationlocal3.errlocal3.*local3.3 (error)local3.err; local3.crit*.debug
printk
Tip
UtilitylogrotateCircular logging, compress and removeSend email using crontabloggerCommand line syslog toollogger -p local0.err 'this message is sent using command line'
Remote loggingModify syslogd script on receiverSYSLOGD="${SYSLOGD} -m 0 -r“Modify syslog.conf on senderlocal0.* @your.host.name

Syslog