System Monitoring and Automation. 2 Section Overview Automation of Periodic Tasks Scheduling and Cron Syslog Accounting.

Slides:



Advertisements
Similar presentations
CIS Lesson 12 System Monitoring 1. CIS Lesson 12 System Monitoring Monitoring Log Files /var/log ‒ Can be used as indication of systematic.
Advertisements

Managing logs with syslog-ng and SWATCH AfNOG 11, Kigali/Rwanda.
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.
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.
2000 Copyrights, Danielle S. Lahmani UNIX Tools G , Fall 2000 Danielle S. Lahmani Lecture 12.
Linux+ Guide to Linux Certification, Second Edition
A Guide to Unix Using Linux Fourth Edition
Chapter 11 Monitoring and Analyzing the Web Environment.
Syslogd Tracking system events. Log servers Applications are constantly encountering events which should be recorded –users attempt to login with bad.
Chapter 9 Periodic Processes. Computer Center, CS, NCTU 2 CRON – Schedule Commands (1)  What we want? Do things at right time automatically  cron daemon.
Information Networking Security and Assurance Lab National Chung Cheng University Investigating Unix System.
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.
UNIX Processes. The UNIX Process A process is an instance of a program in execution. Created by another parent process as its child. One process can be.
Services, logging, accounting Todd Kelley CST8177– Todd Kelley1.
Syslog and log files Ameera Jaradat.
Chapter 12 Incident analysis. Overview 2  Sources of information within popular operating systems  Extracting information from specific systems  Creating.
Va-scanCopyright 2002, Marchany Securing Solaris Servers Randy Marchany.
New SA Training Topic 9: Logging, Monitoring, and Performance  Logging  Windows – “Auditing”  Linux – syslog  Monitoring  MRTG  Big Brother  Performance.
Linux Filesystem Management
A Guide to Unix Using Linux Fourth Edition
August 28, 1998New features in PATROL 3.01 New features in PATROL version 3 Michael Jung (TU-Berlin), Waltraut Niepraschk (DESY) System overview Patrol.
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.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
ITI-481: Unix Administration Meeting 5. Today’s Agenda Network Information Service (NIS) The Cron Program Syslogd and Logging.
ITI-481: Unix Administration Meeting 5 Christopher Uriarte Rutgers University Center for Applied Computing Technologies.
Linux Operations and Administration
System logging and monitoring
Vodafone MachineLink 3G
Citrix MPS 3.0 Licensing Douglas A. Brown President
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.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 6 Manage Linux Processes and Services.
Generating Reports and Analyzing Logs 黃雁亭 陳麗雯 廖榆恬 1.
Linux+ Guide to Linux Certification, Second Edition Chapter 10 Managing Linux 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.
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.
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.
ITI-481: Unix Administration Meeting 5 Christopher Uriarte Rutgers University Center for Applied Computing Technologies.
Periodic Processes. Computer Center, CS, NCTU 2 Windows 7 工作排程.
Periodic Processes Periodically proceed the assigned jobs in BSD… Similar the one in windows.
1 COP 4343 Unix System Administration Unit 8: – at – cron.
Chapter 10 Periodic Processes Unix System Administration.
COP 4343 Unix System Administration
Cosc 4750 Log files.
lctseng / Liang-Chi Tseng Edit: yench
APRICOT 2008 Network Management Taipei, Taiwan February 20-24, 2008
Chapter 9 Periodic Processes
ITIS 3110 IT Infrastructure II
Syslog and Log Rotate yihshih arr. by pschiu.
System Administration
Log management AfNOG 2008 Rabat, Morocco.
Syslog and Log Rotate yihshih.
Accounting Accounting collects information about users and processes
Chapter 11 Syslog And Log Files
CIT 485: Advanced Cybersecurity
Chapter 9 Periodic Processes
CIT 470: Advanced Network and System Administration
Version A.01 H3064S Module 14 Slides
Periodic Processes Chapter 9.
Syslog and Log Rotate.
Syslog and Log Rotate.
Linux Filesystem Management
lctseng / Liang-Chi Tseng
Presentation transcript:

System Monitoring and Automation

2 Section Overview Automation of Periodic Tasks Scheduling and Cron Syslog Accounting

3 Automation and Observation Automation Simplify repetitive tasks Shell Scripting Task Scheduling Observation Current Historical

4 SA Task Classification EasyHard Rarely Often ManuallyDocument AutomatePurchase

5 Periodic Processes Some tasks need to be run at set times crond Runs programs specified in a crontab file Each user has own crontab file crontab command used to modify crontab files

6 crontab File Format FieldDescriptionRange MinuteMinute of the hour0 – 59 HourHour of the day0 – 23 DayDay of the month1 – 31 MonthMonth of the year1 – 12 WeekdayDay of week (Sun – Sat)0 – 6 CommandCommand to run

7 crontab Range Format FormatDescription ValueExact value *Match all values Val1 – Val2Match values between Val1 and Val2 V1 – V2 / StepEvery between V1 and V2 Val1,Val2Match Val1 and Val2 Note: ‘-’, ‘/’, and ‘,’ can be combined

8 crontab Command crontab [-e|-l|-r] [user] -e : Edit the crontab file -l : List the contents of the crontab file -r : Remove the crontab file Root can specify other user crontabs

9 Access Control for cron Can control which users may use cron cron.allow List of users permitted to use cron Checked first cron.deny List of users denied access to cron Checked if cron.allow does not exist

10 ISC (“Vixie”) Cron Replacement for standard cron daemon /etc/crontab – System crontab file Inserted “run-as” field (6) run-parts Scripts put into /etc/cron. cron.hourly (run 1 minute after every hour) cron.daily (run 4:02 daily) cron.weekly (run 4:22 every Sunday) cron.monthy (run 4:42 first of every month)

11 Current System Status Disk Space Usage du : Disk space used by file/directory df : Disk space used by file system Memory/CPU Usage ps uptime free/swap top/gtop

12 Historical Observation Log files Server daemons Syslog Automated tools  swatch  Logcheck  Splunk Accounting Logins/logouts Process usage /var/log & /var/adm

13 syslog : System Logger Central logging facility Standard API Components syslogd /etc/syslog.conf logger Log files

14 syslog.conf Format: selectoraction Selector – facility.level Facility - Who or What  ‘,’ – Separates multiple facilities Level – When  ‘=’ – Matches level  No ‘=’ – Matches level and all above ‘;’ – Separates multiple selectors ‘*’ – Match all facilities or levels Action - What to do with the message

15 Common Syslog Facilities FacilitySource kern Kernel mail Sendmail lpr Printing daemon System Daemons cron Cron Daemon user User processes (default) local0-7 Locally assigned auth Security & Authentication

16 Syslog Severity Levels LevelCondition emerg Panic situations alert Urgent situations crit Critical conditions err Other error conditions warning Warning messages notice Things to check? info Information messages debug Debugging only

17 Syslog Actions ActionMeaning filename Writes message in Forwards message to Forwards message to host at IP user1,user2,… Send to user screens (if logged in) * Send to all logged in user screens Multiple actions require multiple lines!

18 Login Accounting wtmp – DB of all logins and logouts Time User/TTY Where utmp – DB of currently logged in users Reports who/w – Lists currently logged in users last – Lists all login sessions lastlog – List last time users logged in

19 Process Accounting Process information tracked Users Commands run CPU, memory, and I/O usage Accounting system accton – Turns accounting on lastcomm – last command run by user Vendor specific tools Can eat a lot of disk space quickly!!!

20 Why track usage? $$$ - Charging for usage Track user abuse of resources Generating a usage baseline for users Reports for management

21 How long to keep logs? Don’t log at all Reset the logs periodically Rotate log files Via cron date command Permanently archive log data File compression tools Tape CDROM