Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 246 #272
i
i
i
i
i
i
i
i
10.2.2 cron Package
The cron tables are now located in /var/cron/tabs. /etc/crontab
serves as a system-wide cron table. Enter the name of the user who should
run the command directly after the time table (see Example 10.1, here root
is entered). Package-specific tables, located in /etc/cron.d, have the
same format. See man cron.
Example 10.1: Example of an Entry in /etc/crontab
1-59/5 * * * * root test -x /usr/sbin/atrun && /usr/sbin/atrun
/etc/crontab cannot be processed with crontab -e. It must be loaded
directly into an editor, modified, then saved.
A number of packages install shell scripts to the directories /etc/cron.
hourly, /etc/cron.daily, /etc/cron.weekly, and /etc/cron.
monthly, whose instructions are controlled by /usr/lib/cron/run-
crons. /usr/lib/cron/run-crons is run every fifteen minutes from
the main table (/etc/crontab). This guarantees that processes that may
have been neglected can be run at the proper time.
The daily system maintenance jobs have been distributed to various scripts
for reasons of clarity. Along with aaa_base, /etc/cron.daily contains,
for instance, the components backup-rpmdb, clean-tmp, or clean-vi.
10.2.3 Log Files: Package logrotate
There are a number of system services (daemons), which, along with the
kernel itself, regularly record the system status and specific events to log
files. This way, the administrator can regularly check the status of the sys-
tem at a certain point in time, recognize errors or faulty functions, and
troubleshoot them with pinpoint precision. These log files are normally
stored in /var/log as specified by FHS and grow on a daily basis. The
logrotate package helps control the growth of these files.
246 10.2. Hints on Special Software Packages