Useful Scripts for Overworked Administrators
By Mark Prager, May 13, 2004
I work for a startup company, which means we face the usual problems of financing. Because many automated system tools are very expensive, I have written several scripts to help automate some of my daily tasks that monitor our system. I write these scripts in ksh and csh, and, where necessary, a few small C programs because these seem to be the least complicated. The C programs were compiled with gcc. Similarly, the scripts usually come out self-documenting, which means I can leave them running and return to them several months later and still understand what I was trying to do. Also, the scripts run under Solaris 2.5.1-7.0, and can easily be used on other UNIX operating systems.
Figure 2 Example email sent to administrator
From: Super-User [[email protected]]
Sent: Sunday, February 11, 2001 5:08 PM
To: [email protected]
Subject: Output from "cron" command
Your "cron" job on medusa
/usr/local/scripts/check_procs
produced the following output:
ben has 37 processes on host stingray
yaronc has 76 processes on host medusa