Operating System - HP-UX
1752279 Members
4517 Online
108786 Solutions
New Discussion юеВ

Admin tasks that should be done on a regular basis & must-have crontab entries?

 
Jerome Bellet
Advisor

Admin tasks that should be done on a regular basis & must-have crontab entries?

Does anybody have a (somewhat) complete list of admin tasks that must be
done to ensure proper functioning of our boxes (such as running fsck
regularly...)? Sure, it depends on their configuration, but let's consider a
typical system.

And a list of crontab entries that we should create for all of our critical
systems (such as an entry for "dmesg -"...)?

TIA, Jerome
4 REPLIES 4
John Palmer
Honored Contributor

Re: Admin tasks that should be done on a regular basis & must-have crontab entries?

Hi Jerome,

There have been several similar threads on this forum recently. Have a look at:-

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x6c91c3d7fb78d4118fef0090279cd0f9,00.html

Personally, I don't run fsck regularly. From experience I've found that VXFS filesystems in particular are extremely reliable.

Even the regular 'dmesg -' >> /var/adm/messages cron job is somewhat redundant these days because the console messages also get written to syslog.

I still run dmesg - regularly though from a script that checks for particular messages and issues an alert to give me an early warning of potential problems.

Regards,
John
James R. Ferguson
Acclaimed Contributor

Re: Admin tasks that should be done on a regular basis & must-have crontab entries?

Andreas Voss
Honored Contributor

Re: Admin tasks that should be done on a regular basis & must-have crontab entries?

Hi,

nice cronjob would be to delete core files:
find / -name core -exec rm -f {} \;

Also looking at the filesystems usage frequently is very usefull. I've created a script that uses the bdf command and checks if a filesystem is growing neath 95% and warns me with an email. I scheduled this with cron every hour.

Also i've written a script the examines the LVM (vgdisplay/lvdisplay) to look for stale volumes (if you use mirroring you would'nt get any notification if one of the mirrored disk is stale .. of course this event is logged in /var/adm/syslog/syslog.log but who looks there every time)
If the script found stale volumes it infoms me by an email. I run this every 15 minutes by cron.

Regards
CHRIS ANORUO
Honored Contributor

Re: Admin tasks that should be done on a regular basis & must-have crontab entries?

You can include the following in your crontab:
1) cat /dev/null > /var/adm/syslog/mail.log
2) cat /dev/null > /var/adm/wtmp
3) /usr/lbin/sa/sa1 900 4
4) /usr/lbin/sa/sa2 -s 00:00 -e 23:45 -i 3600 -A
You can have scripts that will run sar, vmstat and top with date/timestamp, and include the script in your cron.

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.