Using Linux:Managing Scheduling Services
-->
Previous
Table of Contents
Next
CHAPTER 26Managing Scheduling Services
By David Pitts
Configuring inittab and rc files
Configuring crontab scheduling service
Configuring the at command service
Scheduling resources is a management process. Whether you are scheduling a workforce, a tournament, or class load, you are required to look at each piece from the perspective of the whole. For example, it is good to take English and math in high school, but it is not good to schedule them both at 9:00 in the morning. Part of scheduling, then, is making sure that there are enough resources for all the work. There is only one you, and you can be in only one class at a time.
Scheduling a computers resources is also a management process. Certain processes, by their very nature, use more of the computers resources than other processes. Some require dedicated time or dedicated access, whereas other processes manage regardless. As the system administrator, it is your job to manage all the processes so that maximum efficiency is achieved, and so that the users can get their work done with as little interruption as possible. Fortunately, there are tools that allow you to manage your resources, and even start and stop processes when you are not around. Scheduling services are broken down into three areas:
Processes that run all the time (or once, but always at startup)
Processes that run repeatedly, at a specific time or on a specific day
Processes that run only occasionally
For processes that run all the time, you have two tools: inittab and the rc files. For processes that run repeatedly, at a specific time or on a specific date, you have the crontab tool. For processes that need to be run only occasionally, you have the at tool.
Configuring inittab and rc Files
Before discussing the ins and outs of inittab and rc files, a brief discussion is needed on init, the parent process of inittab. When init is kicked off, it reads the file /etc/inittab, which tells init what to do. Usually, it tells init to allow user logons (gettys), and controls autonomous processes and other at boot time processes.
The init process can run at one of 15 levels. The run level is changed by having a privileged user (root) run /sbin/telinit, which sends appropriate signals to init, telling it which run level to change to.
After it has spawned all its processes, init waits for one of its child processes to die, for a power fail signal, or for a signal from /sbin/telinit to change the systems run level. When one of these changes occurs, the /etc/inittab file is reexamined. Although new entries can be added to this file at any time, init does not read them until one of these three events occurs.
The inittab File
The inittab file, which tells init what to do, is a list of colon-delimited entries that use the following format:
id:runlevels:action:process
Understanding the contents of the inittab file
Lines beginning with a pound sign (#) are comments, and are ignored. Any other lines define processes to be run.
Table 26.1 examines and describes each of these entries.
Table 26.1 The makeup of each line in the inittab file
Entry
Description
id
Identifies a unique sequence of 14 characters, which identifies an entry.
runlevel
Describes at which run level this action should occur.
action
Dictates which action is to be taken.
process
Specifies the process to be executed. If the process field starts with a +, init does not do utmp and wtmp accounting for that process.
Previous
Table of Contents
Next
Wyszukiwarka
Podobne podstrony:
429 16431 (B2007) Sporządzenie rocznego sprawozdania finasowego wazne terminy i informacjeINDEX (429)429 02427 429429 0704 (431)index (429)431,16,artykul429 432więcej podobnych podstron