Schedling Single System Event ( at)
The at command is used to schedule jobs for execution at a later time
A job submitted with at execute once, at the designated time. And it’s only once
# at>7:45am today
# at> who > /tmp/log
# at>
# at> 8:45pm
# at> find /export/home/rimmer –name core -exec rm { } \ ;
# at> contlrd
When you submit an at job, it is assigned a job identification number
The file is stored in the /var/spool/cron/atjobs directory
To view all the jobs currently scheduled in the queue
# ls –l /var/spool/cron/atjobs
The cron daemon controls the scheduling of at files
The file that controls access to at is/etc/cron.d/at.deny
The users listed in this file cannot run at command
To check the jobs that are waiting in the at queue
#atq
#at –1
To remove the at jobs
#at –r
# at now
# at now + 5 minutes
# at now + 1 hour
# at 4pm + 3 days ( run job at 4pm 3days from now )
# at 10am july 31 ( run job at 10am july 31 )
# at lam tommorow
# at now next minute
# at now next hour
# at now next day
# at now next month
# at now next year
# at now next fri
Crontab
It enables you to execute the commands automatically according to a schedule you define
The entries in the crontab file which are executed over an over again at the specified day and time The cron daemon starts when the system boots and runs continuously
The fields in the crontab file
Minutes
Hours
Day of the month
Month of the year
Day of the week
Command
The following example displays a reminder in the user’s console window at
5.00 pm on the 1st and 15th of ever month
0 17 1,15 * * echo hand in timesheet>/dev/console
crontab files are found in /var/spool/cron/crontabs directory
If cron.allow exists only users only users listed in this file can use cron jobs
If cron.allow does not exit all the users can use crontab file except the users listed in cron.deny
SAR (System Active Reporter)
# sar
%usr The percentage of time the CPU spending on user process, such as applications,
shell scripts or interacting with the user
%sys The percentage of time the CPU is spending on kernel tasks
%wio The percentage of time the CPU is waiting for input or output from a block device such as disk
No comments:
Post a Comment