Your SlideShare is downloading. ×
Syslog
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Syslog

958
views

Published on

Published in: Education, Technology

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
958
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Syslogsangjung.woo@gmail.com
  • 2. Syslog
    Standardfor logging program messages
    Generating log from both kernel and app
    Storing log into files, named pipes, remote hosts and specific users
    Both of them
    printk/klog for kernel event
    syslogd for app event
  • 3. Syslog usage
    Java App 1
    Java App 2
    Music
    Video Player
    Multimedia FW
    JVM
    Kernel
    - Critical Message
    - Warning
    - Information
    - *(Everything)
    - Critical Message
    - Warning
    - Information
  • 4. Syslog configuration
    Syslogd default conf file
    /etc/syslog.conf
    Selector + Action
    Sector: Facility + Priority
    Action: Write destination
  • 5. Syslog configuration – con’d
    Priority (/usr/include/sys/syslog.h)
    emerg
    alert
    crit
    err
    warning
    notice
    Info
    debug
  • 6. Syslog configuration – con’d
    Predefined facility (/usr/include/sys/syslog.h)
    kern
    mail
    deamon
    auth
    news
    ftp
    user0~user7
  • 7. Syslogd
    Restart syslog daemon
    sudo /etc/init.d/sysklogdrestart
    /etc/init.d/sysklogd status
  • 8. Example
    Modify syslog.conf
    User level code
  • 9. Example – con’d
    Log message
  • 10. Extension
    Syslog configuration
    local3.err
    local3.*
    local3.3 (error)
    local3.err; local3.crit
    *.debug
  • 11. printk
  • 12. Tip
  • 13. Utility
    logrotate
    Circular logging, compress and remove
    Send email using crontab
    logger
    Command line syslog tool
    logger -p local0.err 'this message is sent using command line'
  • 14. Remote logging
    Modify syslogd script on receiver
    SYSLOGD="${SYSLOGD} -m 0 -r“
    Modify syslog.conf on sender
    local0.* @your.host.name