filesystem check daemon and report prgm Code
Status: Beta
Brought to you by:
rockyb
---------------------- OVERVIEW ---------------------- fs-check checks filesystem sizes to see if they are getting too full. It uses a configuration file that specifies the filesystems to check, email contacts, trigger thresholds (percentage or amount used/unused), and a report program to run. It includes fs-report, which shows things like the largest files, the newest files, and core files. It can be run from cron or as a daemon. More detail... Lines in the configuration that fs-check reads file might look like this: # This is who gets mail when something's wrong and no further specification default owner sysadmin@breakaway.com 90% # This is the program to run when no other program is specified... default action /usr/local/bin/fs-report # Let filesystems get to 90% full before complaining default limit 90% # But let i-nodes go to 98% ... default ilimit 98% limit /oracle 70% owner /oracle dba@breakaway.com action /oracle /var/adm/bin/run_special_oracle_report_program exclude_pat ^/cdrom More detail on fs-check and fs-report can be found in the manual pages. ---------------------- INSTALLATION ---------------------- ** 0. Copy tarfile *** Download. If you are reading this chances are you've done that. ** 1. Untar *** Once you have this, untar the distribution gzipped tar file. If you have GNU tar you run something like this: tar -zxvpf fs-check-version.tar.gz What's this with that the "z" on tar? GNU tar will uncompress while untar'ing. If you don't have GNU tar but have GNU zip: gzcat fs-check-version.tar.gz | tar -xvpf - *** 2. Configure, make and test **** Now run: ./configure If that you don't get any error messages, great! You can see what you can "configure" by giving the --help option, i.e. ./configure --help Next try making the documentation: make If you get an error about "pod2man not found", it is not a big loss if you don't care about documentation. Something I like to do, but I guess it's optional is running the regression tests: make check. Finally install. Depending on the permissions you have on filesystems and this has been configured to get installed (to change the default locationsee --prefix on configure), you might have to be root. make install If you want to do all in one line: ./configure && make && make check && make install Or to live dangerously: ./configure && su -c make install *** 2. Add Crontab line **** Even though fs-check runs as a daemon, it is often run from cron. You might add a like this to your crontab: # # File system checker.... # 5 * * * * /usr/local/bin/fs-check.pl -1 --config /var/adm/fs-check.cnf ---------------------- TEST ---------------------- *** 3. Review configuration *** The defaults should be looked over - some servers may have specially full disks or disks that others should be notified about Test the program like this: fs-check -n -v -1 --config fs-check.cnf