home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2686 / clndf.readme next >
Encoding:
Text File  |  1991-02-08  |  2.1 KB  |  53 lines

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