home *** CD-ROM | disk | FTP | other *** search
- Enclosed is clndf. I use "cln" as the prefix for programs that help me keep
- my system clean of problems.
-
- This programs lets you monitor free disk space and free inodes by disk.
- Each morning, I have a cron job that does a "clndf -u" (update). This
- updates the database file, keeping track of the date and amount of free
- space on each of my disks. Then, whenever I'm wondering what my free
- space has been doing lately, I can do a "clndf -r" to get a report.
-
- Other options are:
-
- -a diskname Add a disk. (Uses the mount point...)
- -l lastcount When using -r, only list the last lastcount entries.
-
- The "-d" option is not implemented.
-
- To implement on your machine:
-
- 1. edit clndf.c, changing the path names for the FN_* #define variables
- 2. touch those files (create empty versions)
- 3. "make clndf".
- 4. clndf -a <dname1> -a <dname2> .. -a <dnamen> to tell clndf
- which disks on your system you want to monitor. Remember to
- use the mount points.
- 5. Add a "clndf -u" to your crontab every morning (or whatever
- granularity you wish -- you could run it every minute if you
- *really* wanted to).
-
- Below is the first two lines of a "df" command on my system. If your system
- is different, you'll need to modify function gather_df() as appropriate.
-
- / (/dev/dsk/10s1 ): 48416 blocks 47070 i-nodes
- /data1 (/dev/dsk/20se ): 39400 blocks 12272 i-nodes
-
- clndf is not column-oriented, but instead skips white space as needed.
-
- There may be bugs. If you find any, let me know. If you fix any, please
- send me a note so I can fix my copy. If you add features, ditto.
-
- clndf assumes you are on a vt100-like terminal (it tosses your terminal
- into and out of 132-column mode to do the report). That's life.
-
- clndf runs cleanly on an NCR Tower 32 running either SysVR2 or SysVR3.
- I try to keep the code clean, so it should run on most SysV-like machines.
- But be careful with chars -- some machines assume unsigned chars, so my
- "while (( c = getopt..." loop never exits.
-
- Note: to help those weenies who don't set their tabstops to 4, I've
- detabbed the source. If you want entab/detab source code, drop me a note.
-
- -Joe Larson
- February 6, 1991
-