ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/generic/statgrab.pl
(Generate patch)

Comparing projects/cms/source/host/generic/statgrab.pl (file contents):
Revision 1.33 by tdb, Tue Feb 13 12:18:07 2001 UTC vs.
Revision 1.35 by tdb, Wed Feb 28 12:26:36 2001 UTC

# Line 109 | Line 109 | sub include_disk() {
109      my($partition_no) = 0;
110      for (my($i) = 0; $i < $#df; $i++) {
111          my($line) = $df[$i];
112 <        $line =~ /^(\/[^\s]*)\s*([0-9]*)\s*([0-9]*)\s*([0-9]*)\s*[^\s]*\s*(\/[^\s]*)\s*/;
112 >        $line =~ /^([^\s]*)\s*([0-9]*)\s*([0-9]*)\s*([0-9]*)\s*[^\s]*\s*(\/[^\s]*)\s*/;
113          # $4 will not match unless everything before it does...
114          if (defined $5) {
115              my ($filesystem, $kbytes, $used, $avail, $mount) = ($1, $2, $3, $4, $5);
# Line 322 | Line 322 | sub include_uptime() {
322  
323      if ($uptime =~ /day.*,\s+([0-9]+):([0-9]+)/) {
324        # normal
325 <        $uptime =~ /up\s+([0-9]+)\s+.*,\s+([0-9]+):([0-9]+)/;
325 >        $uptime =~ /up\s+([0-9]+)\s+[^\s]+,\s+([0-9]+):([0-9]+)/;
326          $uptime = "$1:$2:$3";
327      }
328      else {
329          if ($uptime =~ /day/) {
330              if ($uptime =~ /hr/) {
331                # 0 minutes
332 <                $uptime =~ /up\s+([0-9]+)\s+.*,\s+([0-9]+)\s+.*,/;
332 >                $uptime =~ /up\s+([0-9]+)\s+[^\s]+,\s+([0-9]+)\s+[^\s]+,/;
333                  $uptime = "$1:$2:0";
334              }
335              elsif ($uptime =~ /min/) {
336                # 0 hours
337 <                $uptime =~ /up\s+([0-9]+)\s+.*,\s+([0-9]+)\s+.*,/;
337 >                $uptime =~ /up\s+([0-9]+)\s+[^\s]+,\s+([0-9]+)\s+[^\s]+,/;
338                  $uptime = "$1:0:$2";
339              }
340              else {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines