System Administration

Slides:



Advertisements
Similar presentations
Job and Process Management
Advertisements

ITR3 lecture 7: more introduction to UNIX Thomas Krichel
Basic Unix system administration
2000 Copyrights, Danielle S. Lahmani UNIX Tools G , Fall 2000 Danielle S. Lahmani Lecture 12.
Linux+ Guide to Linux Certification, Second Edition
Chapter 9 Periodic Processes. Computer Center, CS, NCTU 2 CRON – Schedule Commands (1)  What we want? Do things at right time automatically  cron daemon.
CS 497C – Introduction to UNIX Lecture 27: - The Process Chin-Chih Chang
Guide To UNIX Using Linux Third Edition
5 UNIX Processes. Introduction  Processes  How to list them  How to terminate them  Process priorities  Scheduling jobs  Signals.
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.
CHAPTER 21 Automating Jobs. Introduction to Automating Jobs DBAs rely heavily on automating jobs. DBAs cannot be effective without automation. Listed.
Chapter 2 Applying Practical Automation Speaker : Chuang-Hung Shih Date :
Yi Shen Mar 18 th, Backup workshop Stanford Exploration Project.
ITI-481: Unix Administration Meeting 5. Today’s Agenda Network Information Service (NIS) The Cron Program Syslogd and Logging.
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
Guide To UNIX Using Linux Fourth Edition
ITI-481: Unix Administration Meeting 5 Christopher Uriarte Rutgers University Center for Applied Computing Technologies.
Linux Operations and Administration
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:
Linux+ Guide to Linux Certification, Third Edition
Linux Network Configuration Linux System Administration /etc/resolv.conf Tells the kernel which name server should be queried when a program asks to "resolve"
Running the Operational Codes for the Brahmaputra Tom Hopson.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 6 Manage Linux Processes and Services.
Managing processes and services. 1. How Linux handles processes 2. Managing running processes 3. Scheduling processes.
Linux+ Guide to Linux Certification, Second Edition Chapter 10 Managing Linux Processes.
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.
Scis.regis.edu ● CS 468: Advanced UNIX Class 4 Dr. Jesús Borrego Regis University 1.
Guide to Linux Installation and Administration, 2e1 Chapter 11 Using Advanced Administration Techniques.
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.
Linux+ Guide to Linux Certification Chapter Eleven Managing Linux Processes.
Dynamic Batch Processing March 19 10:00 AM David Steger.
Sys Admin Course Job Scheduling Fourie Joubert. Sys Admin Course Very often, you may want a job to run once at a certain time, or to run regularly at.
Running the Operational Codes for the Brahmaputra Tom Hopson.
ITI-481: Unix Administration Meeting 5 Christopher Uriarte Rutgers University Center for Applied Computing Technologies.
Periodic Processes. Computer Center, CS, NCTU 2 Windows 7 工作排程.
Review Please turn in your homework and practicals Packages, installation, rpm command Apache – Quick and easy way to set up a web server to play around.
Agenda The Bourne Shell – Part I Redirection ( >, >>,
Periodic Processes Periodically proceed the assigned jobs in BSD… Similar the one in windows.
UNIX-21 WEEK 2 4/5/2005. UNIX-22 TOPICS Functions (contd.) pushd, popd, dirs Debugging Shell scripts Scheduling Unix jobs Job Management.
Basic UNIX system administration CS 2204 Class meeting 14 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
1 COP 4343 Unix System Administration Unit 8: – at – cron.
Running the Operational Codes for the Brahmaputra Tom Hopson.
Chapter 10 Periodic Processes Unix System Administration.
Processes Todd Kelley CST8207 – Todd Kelley1.
CST8177 Midterm W Answers. Question 1 (10 marks) User clarke (home directory /home/clarke) has two directories in ~, ready and done, where he.
Chapter 6: Managing Processes
Presented by Dave Mawdsley, DACS Member, Linux SIG February 20, 2013
Using Crontab with Ubuntu
Operating System Basics
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Running the Operational Codes for the Brahmaputra
System Programming and administration CS 308
lctseng / Liang-Chi Tseng Edit: yench
Chapter 9 Periodic Processes
Import Cron and Windows Task Scheduler definitions
How to… Use Crontab for SFX
Linux Network Configuration
Like tron and not kron, or chron
UNIX Services and Daemons
SUSE Linux Enterprise Desktop Administration
Chapter Four UNIX File Processing.
Periodic Processes.
Why Background Processing?
Chapter 9 Periodic Processes
Version A.01 H3064S Module 14 Slides
Periodic Processes.
Periodic Processes Chapter 9.
Periodic Processes.
lctseng / Liang-Chi Tseng
Presentation transcript:

System Administration HELP! I need sleep! You go home. Your computer never does. You need sleep. Your computer is up all night. What if your computer cries in the middle of the night?

System Administration Is there any way to automate some tasks? Yes. cron and anacron allow you to schedule tasks to be completed at specific times and/or on specific days Jobs are scheduled to be run using the following sources: crontab file files in /etc/cron.d Files in /var/spool/cron

System Administration These sources are read when the cron daemon crond is started at boot time They are then read every minute thereafter as long as crond is running

System Administration Crontab format The general format of crontab is 5 time fields followed by a command: min h d m dw command where: min minute (0-59) h hour (0-23) d day of the month (1-31) m month (1-12) dw day of the week (0-7) specify the date and time when the command should be run

System Administration Each field can be specified as a range and can contain * as a placeholder, specifying all possible values. 58 23 * * * Fields can also be specified as a list of values. 0 8,18 * * * Finally, fields can have a step value so that the command can be run at periodic intervals */5 * * * *

System Administration The command is executed in the Bourne shell so any redirection of output must follow Bourne shell rules update_logs.pl 1-22 > /dev/null 2>&1

System Administration /etc/crontab 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly /usr/bin/run-parts is a script that runs executes all the files in a given directory In this way, several tasks can be executed at regular intervals with one command. Unfortunately, the names cron.xxxx have no direct association with cron.

System Administration crontab Command Individual users can create their own crontabs with the crontab command crontab -e - create/edit a crontab crontab -l - list the contents of a crontab User crontabs are stored in /var/spool/cron Even root can have its own crontab

System Administration Exercise Use cron to create a heartbeat file for your system # crontab -e */1 * * * * /bin/touch /var/run/heartbeat # ls -l /var/run/heartbeat

System Administration cron vs. anacron cron assumes your system is running continuously (and that crond is running). anacron picks up where cron leaves off. Anacron uses a config file and time stamps to determine the last time a task was done. If the tasks is overdue to be done, anacron makes sure it gets done. anacron does not run continuously. It is a “one shot” command. It is usually invoked on boot-up

System Administration anacron anacron is configured with the file /etc/anacrontab which has the general format period delay job-identifier command anacron checks to see if command has been executed in the last period days, using the timestamp in the file named /var/spool/anacron/job-identifier. If the command has not been run, anacron waits delay minutes and then executes the command.