Syslog and log files1-1 Syslog and Log Files  From logfiles, you can find m important information m History m Errors/warnings  Logging policies m Reset.

Slides:



Advertisements
Similar presentations
Managing logs with syslog-ng and SWATCH AfNOG 11, Kigali/Rwanda.
Advertisements

NetComm Wireless Logging Architecture Feature Spotlight.
Xinwen Fu Linux Logging Mechanisms Computer & Network Forensics.
Detecting Intruders from log files and traces Special Intruder Detection Systems (IDS) are now a market niche, and there are many products on the market.
CIS 193A – Lesson3 Vigilance! Logging & Monitoring Syslog Logrotate Logwatch Accounting.
Netprog: daemons and inetd1 Daemons & inetd Refs: Chapter 13.
2000 Copyrights, Danielle S. Lahmani UNIX Tools G , Fall 2000 Danielle S. Lahmani Lecture 12.
Chapter 11 Syslog and Log Rotate. Computer Center, CS, NCTU 2 Log files  Execution information of each services sshd log files httpd log files ftpd log.
Lesson 22 – Introduction to Linux Systems Administration.
Syslogd Tracking system events. Log servers Applications are constantly encountering events which should be recorded –users attempt to login with bad.
Unix Network Programming Chapter 13: Daemon processes and the inetd superserver Jani Peusaari.
Daemon Processes and inetd Superserver
Information Networking Security and Assurance Lab National Chung Cheng University Investigating Unix System.
Linux+ Guide to Linux Certification, Second Edition
Lecture 16: UNIX Forensics 6/26/2003 CSCE 590 Summer 2003.
Syslog and Log files Haiying Bao June 15, Outline Log files –What need to be logged –Logging policies –Finding log files Syslog: the system event.
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration Logging.
NOC TOOLS syslog AfNOG Cairo, SI-E, 2 of 5 Sunday Folayan.
AfChix 2011 Blantyre, Malawi Log management. Log management and monitoring ■ What is log management and monitoring ? ● It's about keeping your logs in.
Services, logging, accounting Todd Kelley CST8177– Todd Kelley1.
Syslog and log files Ameera Jaradat.
New SA Training Topic 9: Logging, Monitoring, and Performance  Logging  Windows – “Auditing”  Linux – syslog  Monitoring  MRTG  Big Brother  Performance.
CIS 218 Advanced UNIX 1 User and System Information CIS 218.
System Monitoring and Automation CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
ITI-481: Unix Administration Meeting 5. Today’s Agenda Network Information Service (NIS) The Cron Program Syslogd and Logging.
7 November 2005 Sebastian Büttrich ItrainOnline MMTK 1 Linux logging and logfiles monitoring with swatch Sebastian Büttrich, wire.less.dk.
System logging and monitoring
Vodafone MachineLink 3G
System Administration System Configuration and Logs.
System Monitoring and Automation. 2 Section Overview Automation of Periodic Tasks Scheduling and Cron Syslog Accounting.
TELE 301 Lecture 10: Scheduled … 1 Overview Last Lecture –Post installation This Lecture –Scheduled tasks and log management Next Lecture –DNS –Readings:
Day 11 SAMBA NFS Logs Managing Users. SAMBA Implements the ability for a Linux machine to communicate with and act like a Windows file server. –Implements.
Backups, Logging, Troubleshooting. Dates for Last Week of Class Homework 7 – Due Tuesday 5/1 by midnight Labs 7 & 8 – 8 is extra credit – Due Thursday.
CIS 290 LINUX Security Tripwire file integrity and change management tool and log monitoring.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
Linux+ Guide to Linux Certification, Third Edition
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 6 Manage Linux Processes and Services.
Generating Reports and Analyzing Logs 黃雁亭 陳麗雯 廖榆恬 1.
CENT 305 Information Systems Security Overview of System Logging syslog 1.
 Advanced programming for the unix environment (chapters 7,8,9 of both editions + chapter 13(2 nd edition))
Nezer J. Zaidenberg.  Advanced programming for the unix environment (chapters about processes)
Ch11: Syslog and Logfiles Presented by: Apichana Thiantanawat 06/11/02.
1 Periodic Processes and the cron Daemon The cron daemon is where all timed events are initiated. The cron system is serviced by the cron daemon. What.
System Administration HW2 Shell Script xclin. Computer Center, CS, NCTU 2 Requirements  Xferlog statistics (15%) use one-line command to show FTP transfer.
Syslog and Log Rotate. Computer Center, CS, NCTU 2 Log files  Execution information of each services sshd log files httpd log files ftpd log files 
Core System Services. INIT Daemon The init process is the patron of all processes. first process that gets started in any Linux/ UNIX -based system.
TELE 402 Lecture 9: Daemon … 1 by Dr Z. Huang Overview Last Lecture –Broadcast and multicast This Lecture –Daemon processes and advanced I/O functions.
1 LINUX SECURITY. 2 Outline Introduction Introduction - UNIX file permission - UNIX file permission - SUID / SGID - SUID / SGID - File attributes - File.
1 Daemons & inetd Refs: Chapter Daemons A daemon is a process that: –runs in the background –not associated with any terminal Unix systems typically.
Cosc 4750 Log files Logging policies Throw away all data immediately Reset log files at periodic intervals Rotate logs files, keeping data for a fixed.
UNIX Network Programming1 Chapter 12. Daemon Processes and inetd Superserver.
System Administration Performance Monitoring For a server, it is crucial to monitor the health of the machine You need not only real time data collection.
The Linux Kernel About 6 million lines of code
COP 4343 Unix System Administration
Cosc 4750 Log files.
APRICOT 2008 Network Management Taipei, Taiwan February 20-24, 2008
ITIS 3110 IT Infrastructure II
Syslog and Log Rotate yihshih arr. by pschiu.
Log management AfNOG 2008 Rabat, Morocco.
Syslog and Log Rotate yihshih.
Chapter 11 Syslog And Log Files
Syslog and Log Files Chapter 11.
CIT 485: Advanced Cybersecurity
CIT 470: Advanced Network and System Administration
Daemons & inetd Refs: Chapter 12.
Periodic Processes Chapter 9.
Syslog and Log Rotate.
Syslog and Log Rotate.
Presentation transcript:

Syslog and log files1-1 Syslog and Log Files  From logfiles, you can find m important information m History m Errors/warnings  Logging policies m Reset log files at periodic intervals m Rotate log file m Compress and archive m Throw away

Syslog and log files1-2 Syslog and Log files  Where are the log files? m Random log names scattered across dirs/filesystems Two common places: –/var/adm –/var/log m To locate your log file: Read the man for individual daemons Read the system startup scripts Check syslog’s configuration file /etc/syslog.conf

Syslog and log files1-3 Logs (see P 208 for more) Fileprogramwherewhere freqfreq ownerowner contents messagesvariousSMROften the main system log file syslogvariousSMROften the main system log file shutdownlogshutdo wn SMRReasons for shutdown sulogsuHMRAuthorizations wtmp/wtmpxloginHMRConnect-time accounting Httpd/*_loghttpdFWRWeb Server Logs AcctkernelCDRSysV process accunting (binary)

Syslog and log files1-4 Syslog  Is a comprehensive logging system m Manage the information generated by the kernel the system utilities m Has two important function Liberate programmers Put administrators in control of logging m Very flexible Sort message by source, importance Route the message to –log file –users’ terminals, –Remote machines Thus, Centralize the logging for a network

Syslog and log files1-5 Example  Colossus m /var/adm/messages Kernel.notice – ufs quota auth.error – sshd pentential probe of service m /var/adm/sulog m /var/log/syslog m /var/log/authlog m /var/log/dmesg m /etc/syslog.conf  Wopr.csl.mtu.edu m /var/log/messages Lots of sshd messages m /etc/syslog.conf  Dafinn.cs.mtu.edu m Where is httpd log file? /etc/init.d/httpd /etc/httpd/conf –ServerRoot –ErrorLog –Symbolic links m Where is print log file? /etc/init.d/cups –/etc/cups/cupsd.conf –/var/log/cups

Syslog and log files1-6 Syslog  Syslog consists of three parts m The logging daemon: syslogd config file /etc/syslog.conf m Library routines: openlog et al. m User-level log submit command: logger  Syslogd m Is started at the boot time m Write the messages Reads message from special file /dev/log (or others depending on the system), then Consults with the configuration file, then Dispatches each message to the appropriate destination

Syslog and log files1-7 Syslog m Restart syslogd to make config change take effect truncate or rotate the log m Send a HUP signal # kill –HUP `/bin/cat /var/run/syslog.pid` m Configuring syslogd /etc/syslog.conf controls syslogd’s behavior The basic format is Selector action Selectors identify the program and message’s severity level with the format Facility:level Facility, level must be kernel ware names

Syslog and log files1-8 Syslog Valid facility names –Kern –User –mail –Daemon –Auth –Lpr –Cron –Syslog –Mark –local0-7 – ftp –… Valid levels (descending severity) – emerg – alert – crit – err – warning – notice – info – debug – none

Syslog and log files1-9 Syslog Selectors can be combined –Separated by semicolon ; –* to represent all facilities except mark Actions: –Filename –User1, user2, … –* Example: *.err;kern.debug;daemon.notice;mail.crit /var/adm/messages kern.notice /var/log/kern.notice *.alert;kern.err;daemon.err operator *.alert root

Syslog and log files1-10 Syslog  central logging host m Keep the log one place, easy to check. m Need a stable server What if netloghost is down? m The time stamp does not reflect the time on the originating host

Syslog and log files1-11 Using syslog from programs  Functions m Openlog m Syslog m Closelog  C calls void openlog(const char *ident, int option, int facility); void syslog(int priority, const char *format,...); void closelog(void);  Perl calls Use Sys::Syslog; Openlog(ident, logopt, facility) Syslog(priority, message, …) Closelog()

Syslog and log files1-12 Logger  Logger command m Create a log entry m Debug syslogd’s configuration file Example: –After a new line was added to syslog.conf Local5.warning/tmp/evi.log –Run $ logger –p local5.warning “test message” –To see if “test message” is written in /tmp/evi.log

Syslog and log files1-13 Log analyzer  Get the related info out of lines m Write up your own scripts Check for certain patterns Send to you m Commonly used log postprocessors Swatch Logcheck  Couple of things to look for m Security-related messages m Disk full m Messages that are repeated many times