sysAdmin Software, Release 1.2

Why was sysAdmin written?

sysAdmin was originally written by somebody who would rather remain nameless (He's written other software for the net before, and doesn't want to support yet another package) It was released to me to release to the net, and to maintain it.

sysAdmin is a set of programs that runs on your U_IX computers and looks for things that are wrong. It then bundles this information together from all the machines that it was run on and sends it to you as an email report.


What machines does sysAdmin run on?

Machines Supported are
OSRev LevelSupport Level
HP-UX9.05High/Current
HP-UX9.07High/Current
HP-UX10.20High/Current
Solaris5.4High/Current
Solaris5.5High/Current
Solaris5.6High/Current
SunOS4.3Low/out of date
AIX???Low/out of date
IRIX???Low/out of date
Ultrix???Low/out of date
OSF1???Low/out of date

Bug fixes to bring sysAdmin up to date on the current revisions of OSF1, Ultrix, IRIX, and AIX are appreciated.


What does sysAdmin check and when does it check it?

sysAdmin checks a variety of things that could go wrong with a typical U_IX computer, and then reports them back to you. These checks can be run on either a daily, or a weekly basis. This same script can perform two kinds of checks, depend on how it is invoked.

Usage: ./sysAdmin [-u|-usage] [-daily|-weekly] [-server|-client]  hosts

A -daily invocation will run only the checks that you have designated to run on a daily basis.

A -weekly invocation will run only the checks that you have designated to run on a weekly basis (Like on a Friday or Saturday night).

A -server invocation will run the checks from the central server to ALL machines that you have listed in the hosts.machinename file.

A -client invocation will run the checks only on the machine that you invoked sysAdmin on. This option is typically only used from within the runSysAdmin script, or by hand to debug problems.

Checking procedure nameCheck performedTypically run
checkNetGroupChecks Netgroup for hosts that do not existDaily
reportEepromChecks the serial number in eeprom on Sun boxesDaily
reportNightlyDistChecks for the existence of a /tmp/.everynight file. This file is
created by a NightlyDist program which copies system
files to different machines. This could be modified to check for
the existence of any file which should be created nightly.
Daily
checkPrintQueuesChecks the local print spooler for large unprinted filesDaily
reportDiskSpaceChecks to see which disks are filling upDaily
reportErrorMessagesDiscontinued.Daily
reportLoadAverageChecks for high load averagesDaily
reportMailQueueChecks mail queue for unsent emailDaily
reportMailChecks mail spool for unread mailDaily
reportClutterChecks / and /usr for trash filesDaily
reportMountsChecks for weird mount pointsDaily
reportDumpsChecks /etc/dumpdates to make sure backups are workingDaily
reportRCChecks rc.local file to see if rc.local.all.machines is being
invoked. This could be modified to check for any command line
in any of the startup scripts.
Daily
reportTmpChecks /tmp to see if it is filling upDaily
reportMiscDiscontinuedDaily
formattAliasesChecks for bogus mail aliasesDaily
formattPasswdChecks for bogus password entresDaily
formattGroupChecks unknown users in the group fileDaily
formattRwhoChecks to see if a machine is has rwho enabledDaily
formattRcsChecks for checked out RCS files in /, /etc, and /var/ypmapsDaily
reportTimeChecks machine's time against the serverDaily
reportPasswdsChecks to make sure root's password is the same as on the master machineDaily
reportForwardsChecks users with .forwardsin their home directoryDaily
reportUnownedFilesChecks all local filesystems for files without an owner or groupweekly
reportLostFoundChecks lost+found directories for entriesweekly
reportDiskUsageChecks how much disk space each user is using in
their home directory
weekly


How to run sysAdmin

sysAdmin is run from root's cron (Typically)
# crontab -l |grep sysA
1 5 * * 1-5 /cadappl/packages/sysAdmin/1.1/bin/sysAdmin -daily -server |mailx -s"sysAdmin Output" ericw
1 5 * * 6 /cadappl/packages/sysAdmin/1.1/bin/sysAdmin -weekly -server |mailx -s"sysAdmin Output" ericw

This is run from a machine that can rsh to the machines you want checked. Yes, I know that being able to rsh to machines to execute a command is a security hole. If you don't like it, then add the following line to cron on each of the machines where you want it to run.

/usr/local/etc/sysAdmin -daily -client -standalone

How to configure sysAdmin

Edit the configure program for the right paths to the system files. Please note that as sysAdmin is currently written, it requires a filepath to the system files. (NOT from NIS or NIS+) If your only access to these files is through NIS or some other mechanism, then you should run the included getNISfiles program on the server just before running sysAdmin.

cd to the sysAdmin source directory (Where the configure script is!)

run configure as

./configure

run make as

make install

Create a file in the sysAdmin lib directory (Just created from the make install) to create a file called my_hosts.machinename where machinename is the name of the host where sysAdmin will be run from. The machines listed in this file will be scanned when sysAdmin is run on host machinename. This way you can have several master sysAdmin server hosts checking multiple machines at the same time.

my_hosts.machinename will look something like this:

abqh28 
abqh30
abqh38
abqh39
abqh172
abqh174
abqh237

Future Improvements

There are a few things that still need to be done to improve sysAdmin. The more people complain/request them, the faster they will be added to the code. (Hey, it works ok for me. If you use it, and let me know that you want/need these changes, then I will add them. If nobody asks, then I won't waste my time.)


Known Bugs

UNUSUAL ERROR MESSAGES:

Scalar found where operator expected at (eval 9) line 1, near "&formatt($tag"
(Missing operator before $tag?)

This means you found a bug in Perl 5.003. Please upgrade to perl 5.004_04


sysAdmin Version 1.2 tar file
Sample output report

This page last updated Feb 19, 2009 by Eric Wedaa