home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume10 / dusage.pl < prev    next >
Encoding:
Text File  |  1990-02-13  |  18.4 KB  |  682 lines

  1. Newsgroups: comp.sources.misc
  2. From: jv@mh.nl (Johan Vromans)
  3. subject: v10i065: Watching disk usage
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 10, Issue 65
  7. Submitted-by: jv@mh.nl (Johan Vromans)
  8. Archive-name: dusage.pl
  9.  
  10. Guarding disk space is one of the problems of system management. 
  11.  
  12. Some time ago I converted an old awk/sed/sh script to keep track of
  13. disk usage to a new perl program, added new features, options; even
  14. wrote a manual page.
  15.  
  16. Using a list of pathnames, this program filters the output of du(1) to
  17. find the amount of disk space used for each of the paths (actually, it
  18. collects all values in one single du run). It adds the new value to
  19. the list, shifting old values up. It then generates a nice report of
  20. the amount of disk space occupied in each of the specified paths,
  21. together with the amount it grew (or shrinked) since the previous run,
  22. and since 7 runs ago. When run daily, this gives daily and weekly
  23. figures.
  24.  
  25. #---------------------------------- cut here ----------------------------------
  26. # This is a shell archive.  Remove anything before this line,
  27. # then unpack it by saving it in a file and typing "sh file".
  28. #
  29. # Wrapped by Johan Vromans <jv@mh.nl> on Sat Feb  3 21:36:57 1990
  30. #
  31. # This archive contains:
  32. #    README        dusage.1    dusage.pl    
  33. #
  34. # Error checking via wc(1) will be performed.
  35.  
  36. LANG=""; export LANG
  37.  
  38. echo x - README
  39. cat >README <<'@EOF'
  40. Guarding disk space is one of the problems of system management. 
  41.  
  42. Some time ago I converted an old awk/sed/sh script to keep track of
  43. disk usage to a new perl program, added new features, options; even
  44. wrote a manual page.
  45.  
  46. Using a list of pathnames, this program filters the output of du(1) to
  47. find the amount of disk space used for each of the paths (actually, it
  48. collects all values in one single du run). It adds the new value to
  49. the list, shifting old values up. It then generates a nice report of
  50. the amount of disk space occupied in each of the specified paths,
  51. together with the amount it grew (or shrinked) since the previous run,
  52. and since 7 runs ago. When run daily, this gives daily and weekly
  53. figures.
  54.  
  55. # This program requires perl version 3.0, patchlevel 4 or higher.
  56.  
  57. # Copyright 1990 Johan Vromans, all rights reserved.
  58. # Peaceware. This program may be used, modified and distributed as long as
  59. # this copyright notice remains part of the source. It may not be sold, or 
  60. # be used to harm any living creature including the world and the universe.
  61. @EOF
  62. set `wc -lwc <README`
  63. if test $1$2$3 != 211931064
  64. then
  65.     echo ERROR: wc results of README are $* should be 21 193 1064
  66. fi
  67.  
  68. chmod 644 README
  69.  
  70. echo x - dusage.1
  71. cat >dusage.1 <<'@EOF'
  72. .TH DUSAGE 1
  73. .SH NAME
  74. dusage \- provide disk usage statistics
  75. .SH SYNOPSIS
  76. .B dusage
  77. .RB [ \-afghruD ]
  78. .RI "[\fB\-i\fR" " input" ]
  79. .RI "[\fB\-p\fR" " dir" ]
  80. .RI [ "control file" ]
  81. .SH DESCRIPTION
  82. .I Dusage
  83. is a perl script which produces disk usage statistics. These
  84. statistics include the number of blocks, the increment since the previous run
  85. (which is assumed to be yesterday if run daily), and the increment
  86. since 7 runs ago (which could be interpreted as a week if run daily).
  87. .I Dusage
  88. is driven by a 
  89. .IR "control file" ,
  90. which describes the names of the files (directories) to be reported,
  91. and which also contains the results of previous runs.
  92. .PP
  93. When
  94. .I dusage
  95. is run, it reads the
  96. .IR "control file" ,
  97. [optionally] gathers new disk usage values by calling
  98. .IR du (1),
  99. prints the report, and [optionally] updates the
  100. .I control file
  101. with the new information.
  102. .PP
  103. Filenames in the control file may have wildcards. In this case, the
  104. wildcards are expanded, and all entries reported. Both the expanded
  105. names as the wildcard info are maintained in the control file. New
  106. files in these directories will automatically show up, deleted files
  107. will disappear when they have run out of data in the control file (but
  108. see the 
  109. .B \-r
  110. option).
  111. .br
  112. Wildcard expansion only adds filenames which are not already on the list.
  113. .PP
  114. The control file may also contain filenames preceded with an
  115. exclamation mark ``!''; these entries are skipped. This is meaningful
  116. in conjunction with wildcards, to exclude entries which result from a
  117. wildcard expansion.
  118. .PP
  119. The control file may have lines starting with a dash ``\-'',
  120. which causes the report to start on a new page. Any text following the
  121. dash is placed in the page header, immediately following the text
  122. ``Disk usage statistics''.
  123. .PP
  124. The available command line options are:
  125. .TP 5
  126. .B \-D
  127. Turns on debugging, which yields lots of trace information.
  128. .TP
  129. .B \-a
  130. Reports the statistics for this and all previous runs, as opposed to
  131. the normal case, which is to generate the statistics for this run, and
  132. the differences between the previous and 7th previous run.
  133. .TP
  134. .B \-f
  135. Reports file statistics also. Default is to only report directories.
  136. .TP
  137. .B \-g
  138. Gathers new data by calling 
  139. .IR du (1).
  140. .TP
  141. .B \-h
  142. Provides a help message. No work is done.
  143. .TP
  144. .BI \-i " input"
  145. Uses
  146. .I input
  147. as data obtained by calling
  148. .IR du (1).
  149. .TP
  150. .BI \-p " dir"
  151. All filenames in the control file are interpreted relative to this
  152. directory.
  153. .TP
  154. .B \-r
  155. Retains entries which don't have any data anymore. If this option is
  156. not used, entries without data are not reported, and removed from the
  157. control file.
  158. .TP
  159. .B \-u
  160. Update the control file with new values.
  161. .PP
  162. The default name for the control file is
  163. .BR .du.ctl ,
  164. optionally preceded by the name supplied with the
  165. .B \-p
  166. option.
  167. .SH EXAMPLES
  168. Given the following control file:
  169. .sp
  170. .nf
  171. .ne 3
  172. .in +.5i
  173. \- for manual page
  174. maildir
  175. maildir/*
  176. !maildir/unimportant
  177. src
  178. .in
  179. .fi
  180. .sp
  181. This will generate the following (example) report when running the
  182. command ``dusage -gu controlfile'':
  183. .sp
  184. .nf
  185. .ne 7
  186. .in +.5i
  187. Disk usage statistics for manual page      Wed Jan 10 13:38
  188.  
  189.  blocks    +day     +week  directory
  190. -------  -------  -------  --------------------------------
  191.    6518                    maildir
  192.       2                    maildir/dirent
  193.     498                    src
  194. .in
  195. .fi
  196. .sp
  197. After updating the control file, it will contain:
  198. .sp
  199. .nf
  200. .ne 4
  201. .in +.5i
  202. \- for manual page
  203. maildir 6518::::::
  204. maildir/dirent  2::::::
  205. maildir/*
  206. !maildir/unimportant
  207. src     498::::::
  208. .in
  209. .fi
  210. .sp
  211. The names in the control file are separated by the values with a TAB;
  212. the values are separated with colons. Also, the entries found by
  213. expanding the wildcard are added. If the wildcard expansion had
  214. generated a name ``maildir/unimportant'' it would have been skipped.
  215. .br
  216. When the program is rerun after one day, it could print the following
  217. report:
  218. .sp
  219. .nf
  220. .ne 7
  221. .in +.5i
  222. Disk usage statistics for manual page      Wed Jan 10 13:38
  223.  
  224.  blocks    +day     +week  directory
  225. -------  -------  -------  --------------------------------
  226.    6524       +6           maildir
  227.       2        0           maildir/dirent
  228.     486      -12           src
  229. .in
  230. .fi
  231. .sp
  232. The control file will contain:
  233. .sp
  234. .nf
  235. .ne 4
  236. .in +.5i
  237. \- for manual page
  238. maildir 6524:6518:::::
  239. maildir/dirent  2:2:::::
  240. maildir/*
  241. !maildir/unimportant
  242. src     486:498:::::
  243. .in
  244. .fi
  245. .sp
  246. It takes very little fantasy to imagine what will happen on subsequent
  247. runs...
  248. .PP
  249. When the contents of the control file are to be changed, e.g. to add
  250. new filenames, a normal text editor can be used. Just add or remove
  251. lines, and they will be taken into account automatically.
  252. .PP
  253. When run without 
  254. .B \-g
  255. or
  256. .B \-u
  257. options, it actually reproduces the report from the previous run.
  258. .PP
  259. When multiple runs are required, save the output of
  260. .IR du (1)
  261. in a file, and pass this file to
  262. .I dusage
  263. using the 
  264. .BI \-i "file"
  265. option.
  266. .SH BUGS
  267. Running the same control file with different values of the 
  268. .B \-f
  269. and
  270. .B \-r
  271. options may cause strange results.
  272. .SH AUTHOR
  273. Johan Vromans, Multihouse Research, Gouda, The Netherlands.
  274. .sp
  275. Send bugs and remarks to <jv@mh.nl> .
  276. @EOF
  277. set `wc -lwc <dusage.1`
  278. if test $1$2$3 != 2048505139
  279. then
  280.     echo ERROR: wc results of dusage.1 are $* should be 204 850 5139
  281. fi
  282.  
  283. chmod 444 dusage.1
  284.  
  285. echo x - dusage.pl
  286. sed 's/^@//' >dusage.pl <<'@EOF'
  287. #!/usr/bin/perl
  288.  
  289. # This program requires perl version 3.0, patchlevel 4 or higher.
  290.  
  291. # Copyright 1990 Johan Vromans, all rights reserved.
  292. # Peaceware. This program may be used, modified and distributed as long as
  293. # this copyright notice remains part of the source. It may not be sold, or 
  294. # be used to harm any living creature including the world and the universe.
  295.  
  296. $my_name = $0;
  297.  
  298. ################ usage ################
  299.  
  300. sub usage {
  301.   local ($help) = shift (@_);
  302.   local ($usg) = "usage: $my_name [-afghruD][-i input][-p dir] ctlfile";
  303.   die "$usg\nstopped" unless $help;
  304.   print STDERR "$usg\n";
  305.   print STDERR <<EndOfHelp
  306.  
  307.     -D          - provide debugging info
  308.     -a          - provide all statis
  309.     -f          - also report file statistics
  310.     -g          - gather new data
  311.     -h          - this help message
  312.     -i input    - input data as obtained by 'du dir' [def = 'du dir']
  313.     -p dir      - path to which files in the control file are relative
  314.     -r          - do not discard entries which don't have data
  315.     -u          - update the control file with new values
  316.     ctlfile     - file which controls which dirs to report [def = dir/.du.ctl]
  317. EndOfHelp
  318.   ;
  319.   exit 1;
  320. }
  321.  
  322. ################ main stream ################
  323.  
  324. &do_get_options;        # process options
  325. &do_parse_ctl;            # read the control file
  326. &do_gather if $gather;        # gather new info
  327. &do_report_and_update;        # report and update
  328.  
  329. ################ end of main stream ################
  330.  
  331. ################ other subroutines ################
  332.  
  333. sub do_get_options {
  334.  
  335.   # Default values for options
  336.  
  337.   $debug = 0;
  338.   $noupdate = 1;
  339.   $retain = 0;
  340.   $gather = 0;
  341.   $allfiles = 0;
  342.   $allstats = 0;
  343.  
  344.   # Command line options. We use a modified version of getopts.pl.
  345.  
  346.   &usage (0) if &Getopts ("Dafghi:p:ru");
  347.   &usage (1) if $opt_h;
  348.   &usage (0) if $#ARGV > 0;
  349.  
  350.   $debug    |= $opt_D if defined $opt_D;    # -D -> debug
  351.   $allstats |= $opt_a if defined $opt_a;    # -a -> all stats
  352.   $allfiles |= $opt_f if defined $opt_f;    # -f -> report all files
  353.   $gather   |= $opt_g if defined $opt_g;    # -g -> gather new data
  354.   $retain   |= $opt_r if defined $opt_r;    # -r -> retain old entries
  355.   $noupdate = !$opt_u if defined $opt_u;    # -u -> update the control file
  356.   $du        = $opt_i if defined $opt_i;    # -i input file
  357.   if ( defined $opt_p ) {            # -p path
  358.     $root = $opt_p;
  359.     $root = $` while ($root =~ m|/$|);
  360.     $prefix = "$root/";
  361.     $root = "/" if $root eq "";
  362.   }
  363.   else {
  364.     $prefix = $root = "";
  365.   }
  366.   $table    = ($#ARGV == 0) ? shift (@ARGV) : "$prefix.du.ctl";
  367.   $runtype = $allfiles ? "file" : "directory";
  368.   if ($debug) {
  369.     print STDERR "@(#)@ dusage    1.7 - dusage.pl\n";
  370.     print STDERR "Options:";
  371.     print STDERR " debug" if $debug;    # silly, isn't it...
  372.     print STDERR $noupdate ? " no" : " ", "update";
  373.     print STDERR $retain ? " " : " no", "retain";
  374.     print STDERR $gather ? " " : " no", "gather";
  375.     print STDERR $allstats ? " " : " no", "allstats";
  376.     print STDERR "\n";
  377.     print STDERR "Root = $root [prefix = $prefix]\n";
  378.     print STDERR "Control file = $table\n";
  379.     print STDERR "Input data = $du\n" if defined $du;
  380.     print STDERR "Run type = $runtype\n";
  381.     print STDERR "\n";
  382.   }
  383. }
  384.  
  385. sub do_parse_ctl {
  386.  
  387.   # Parsing the control file.
  388.   #
  389.   # This file contains the names of the (sub)directories to tally,
  390.   # and the values dereived from previous runs.
  391.   # The names of the directories are relative to the $root.
  392.   # The name may contain '*' or '?' characters, and will be globbed if so.
  393.   # An entry starting with ! is excluded.
  394.   #
  395.   # To add a new dir, just add the name. The special name '.' may 
  396.   # be used to denote the $root directory. If used, '-p' must be
  397.   # specified.
  398.   #
  399.   # Upon completion:
  400.   #  - %oldblocks is filled with the previous values,
  401.   #    colon separated, for each directory.
  402.   #  - @targets contains a list of names to be looked for. These include
  403.   #    break indications and globs info, which will be stripped from
  404.   #    the actual search list.
  405.  
  406.   open (tb, "<$table") || die "Cannot open control file $table, stopped";
  407.   @targets = ();
  408.   %oldblocks = ();
  409.   %newblocks = ();
  410.  
  411.   while ($tb = <tb>) {
  412.     chop ($tb);
  413.  
  414.     # preferred syntax: <dir><TAB><size>:<size>:....
  415.     # allowable          <dir><TAB><size> <size> ...
  416.     # possible          <dir>
  417.  
  418.     if ( $tb =~ /^-/ ) {    # break
  419.       push (@targets, "$tb");
  420.       printf STDERR "tb: *break* $tb\n" if $debug;
  421.       next;
  422.     }
  423.  
  424.     if ( $tb =~ /^!/ ) {    # exclude
  425.       $excl = $';        #';
  426.       @a = grep ($_ ne $excl, @targets);
  427.       @targets = @a;
  428.       push (@targets, "*$tb");
  429.       printf STDERR "tb: *excl* $tb\n" if $debug;
  430.       next;
  431.     }
  432.  
  433.     if ($tb =~ /^(.+)\t([\d: ]+)/) {
  434.       $name = $1;
  435.       @blocks = split (/[ :]/, $2);
  436.     }
  437.     else {
  438.       $name = $tb;
  439.       @blocks = ("","","","","","","","");
  440.     }
  441.  
  442.     if ($name eq ".") {
  443.       if ( $root eq "" ) {
  444.     printf STDERR "Warning: \".\" in control file w/o \"-p path\" - ignored\n";
  445.     next;
  446.       }
  447.       $name = $root;
  448.     } else {
  449.       $name = $prefix . $name unless ord($name) == ord ("/");
  450.     }
  451.  
  452.     # Check for globs ...
  453.     if ( $gather && $name =~ /\*|\?/ ) {
  454.       print STDERR "glob: $name\n" if $debug;
  455.       foreach $n ( <${name}> ) {
  456.     next unless $allfiles || -d $n;
  457.     # Globs never overwrite existing entries
  458.     if ( !defined $oldblocks{$n} ) {
  459.       $oldblocks{$n} = ":::::::";
  460.       push (@targets, $n);
  461.     }
  462.     printf STDERR "glob: -> $n\n" if $debug;
  463.       }
  464.       # Put on the globs list, and terminate this entry
  465.       push (@targets, "*$name");
  466.       next;
  467.     }
  468.  
  469.     push (@targets, "$name");
  470.     # Entry may be rewritten (in case of globs)
  471.     $oldblocks{$name} = join (":", @blocks[0..7]);
  472.  
  473.     print STDERR "tb: $name\t$oldblocks{$name}\n" if $debug;
  474.   }
  475.   close (tb);
  476. }
  477.  
  478. sub do_gather {
  479.  
  480.   # Build a targets match string, and an optimized list of directories to
  481.   # search.
  482.   $targets = "//";
  483.   @list = ();
  484.   $last = "///";
  485.   foreach $name (sort (@targets)) {
  486.     next if $name =~ /^[-*]/;
  487.     next unless $allfiles || -d $name;
  488.     $targets .= "$name//"; 
  489.     next if ($name =~ m|^$last/|);
  490.     push (@list, $name);
  491.     $last = $name;
  492.   }
  493.  
  494.   print STDERR "targets: $targets\n" if $debug;
  495.   print STDERR "list: @list\n" if $debug;
  496.   print STDERR "reports: @targets\n" if $debug;
  497.  
  498.   $du = "du " . ($allfiles ? "-a" : "") . " @list|"
  499.     unless defined $du; # in which case we have a data file
  500.  
  501.   # Process the data. If a name is found in the target list, 
  502.   # %newblocks will be set to the new blocks value.
  503.  
  504.   open (du, "$du") || die "Cannot get data from $du, stopped";
  505.   while ($du = <du>) {
  506.     chop ($du);
  507.     ($blocks,$name) = split (/\t/, $du);
  508.     if (($i = index ($targets, "//$name//")) >= 0) {
  509.       # tally and remove entry from search list
  510.       $newblocks{$name} = $blocks;
  511.       print STDERR "du: $name $blocks\n" if $debug;
  512.       substr ($targets, $i, length($name) + 2) = "";
  513.     }
  514.   }
  515.   close (du);
  516. }
  517.  
  518.  
  519. # Report generation
  520.  
  521. format std_hdr =
  522. Disk usage statistics@<<<<<<<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<
  523. $subtitle, $date
  524.  
  525.  blocks    +day     +week  @<<<<<<<<<<<<<<<
  526. $runtype
  527. -------  -------  -------  --------------------------------
  528. @.
  529. format std_out =
  530. @@>>>>>> @>>>>>>> @>>>>>>>  ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<..
  531. $blocks, $d_day, $d_week, $name
  532. @.
  533.  
  534. format all_hdr =
  535. Disk usage statistics@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<           @<<<<<<<<<<<<<<<
  536. $subtitle, $date
  537.  
  538.  --0--    --1--    --2--    --3--    --4--    --5--    --6--    --7--   @<<<<<<<<<<<<<<<
  539. $runtype
  540. -------  -------  -------  -------  -------  -------  -------  -------  --------------------------------
  541. @.
  542. format all_out =
  543. @@>>>>>> @>>>>>>> @>>>>>>> @>>>>>>> @>>>>>>> @>>>>>>> @>>>>>>> @>>>>>>>  ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<..
  544. $a[0],  $a[1],   $a[2],   $a[3],   $a[4],   $a[5],   $a[6],   $a[7],    $name
  545. @.
  546.  
  547. sub do_report_and_update {
  548.  
  549.   # Prepare update of the control file
  550.   if ( !$noupdate ) {
  551.     if ( !open (tb, ">$table") ) {
  552.       print STDERR "Warning: cannot update control file $table - continuing\n";
  553.       $noupdate = 1;
  554.     }
  555.   }
  556.  
  557.   if ( $allstats ) {
  558.     $^ = "all_hdr";
  559.     $~ = "all_out";
  560.   }
  561.   else {
  562.     $^ = "std_hdr";
  563.     $~ = "std_out";
  564.   }
  565.   $date = `date`;
  566.   chop ($date);
  567.  
  568.   # In one pass the report is generated, and the control file rewritten.
  569.  
  570.   foreach $name (@targets) {
  571.     if ($name =~ /^-/ ) {
  572.       $subtitle = $';                #';
  573.       print tb "$name\n" unless $noupdate;
  574.       print STDERR "tb: $name\n" if $debug;
  575.       $- = -1;
  576.       next;
  577.     }
  578.     if ($name  =~ /^\*$prefix/ ) {
  579.       print tb "$'\n" unless $noupdate;        #';
  580.       print STDERR "tb: $'\n" if $debug;    #';
  581.       next;
  582.     }
  583.     @a = split (/:/, $oldblocks{$name});
  584.     unshift (@a, $newblocks{$name}) if $gather;
  585.     $name = "." if $name eq $root;
  586.     $name = $' if $name =~ /^$prefix/;        #';
  587.     if ($#a < 0) {    # no data?
  588.       if ($retain) {
  589.     @a = ("","","","","","","","");
  590.       }
  591.       else {
  592.     # Discard
  593.     print STDERR "--: $name\n" if $debug;
  594.     next;
  595.       }
  596.     }
  597.     print STDERR "Warning: ", 1+$#a, " entries for $name\n"
  598.       if ($debug && $#a != 8);
  599.     $line = "$name\t" . join(":",@a[0..7]) . "\n";
  600.     print tb $line unless $noupdate;
  601.     print STDERR "tb: $line" if $debug;
  602.  
  603.     $blocks = $a[0];
  604.     if ( !$allstats ) {
  605.       $d_day = $d_week = "";
  606.       if ($blocks ne "") {
  607.     if ($a[1] ne "") {        # dayly delta
  608.       $d_day = $blocks - $a[1];
  609.       $d_day = "+" . $d_day if $d_day > 0;
  610.     }
  611.     if ($a[7] ne "") {        # weekly delta
  612.       $d_week = $blocks - $a[7];
  613.       $d_week = "+" . $d_week if $d_week > 0;
  614.     }
  615.       }
  616.     }
  617.     write;
  618.   }
  619.  
  620.   # Close control file, if opened
  621.   close (tb) unless $noupdate;
  622. }
  623.  
  624. # Modified version of getopts ...
  625.  
  626. sub Getopts {
  627.     local($argumentative) = @_;
  628.     local(@args,$_,$first,$rest);
  629.     local($opterr) = 0;
  630.  
  631.     @args = split( / */, $argumentative );
  632.     while(($_ = $ARGV[0]) =~ /^-(.)(.*)/) {
  633.     ($first,$rest) = ($1,$2);
  634.     $pos = index($argumentative,$first);
  635.     if($pos >= $[) {
  636.         if($args[$pos+1] eq ':') {
  637.         shift(@ARGV);
  638.         if($rest eq '') {
  639.             $rest = shift(@ARGV);
  640.         }
  641.         eval "\$opt_$first = \$rest;";
  642.         }
  643.         else {
  644.         eval "\$opt_$first = 1";
  645.         if($rest eq '') {
  646.             shift(@ARGV);
  647.         }
  648.         else {
  649.             $ARGV[0] = "-$rest";
  650.         }
  651.         }
  652.     }
  653.     else {
  654.         print stderr "Unknown option: $first\n";
  655.         $opterr++;
  656.         if($rest ne '') {
  657.         $ARGV[0] = "-$rest";
  658.         }
  659.         else {
  660.         shift(@ARGV);
  661.         }
  662.     }
  663.     }
  664.     return $opterr;
  665. }
  666. @EOF
  667. set `wc -lwc <dusage.pl`
  668. if test $1$2$3 != 379157810356
  669. then
  670.     echo ERROR: wc results of dusage.pl are $* should be 379 1578 10356
  671. fi
  672.  
  673. chmod 444 dusage.pl
  674.  
  675. exit 0
  676. --
  677. Johan Vromans                       jv@mh.nl via internet backbones
  678. Multihouse Automatisering bv               uucp: ..!{uunet,hp4nl}!mh.nl!jv
  679. Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62944/62500
  680. ------------------------ "Arms are made for hugging" -------------------------
  681.  
  682.