--- projects/cms/source/host/generic/statgrab.pl 2001/02/13 12:18:07 1.33 +++ projects/cms/source/host/generic/statgrab.pl 2001/02/26 23:58:42 1.34 @@ -3,7 +3,7 @@ #----------------------------------------------------------------- # Machine statistics grabber # $Author: tdb $ -# $Id: statgrab.pl,v 1.33 2001/02/13 12:18:07 tdb Exp $ +# $Id: statgrab.pl,v 1.34 2001/02/26 23:58:42 tdb Exp $ # # A Perl script to return various information about a host machine # by examining the output of some common Unix/Linux commands. @@ -76,7 +76,7 @@ exit(0); # the host should check this when reading data # means the host must be checked and updated to work with newer versions. sub print_ident() { - print 'version statgrab.pl $Revision: 1.33 $'; + print 'version statgrab.pl $Revision: 1.34 $'; print "\n"; } @@ -322,19 +322,19 @@ sub include_uptime() { if ($uptime =~ /day.*,\s+([0-9]+):([0-9]+)/) { # normal - $uptime =~ /up\s+([0-9]+)\s+.*,\s+([0-9]+):([0-9]+)/; + $uptime =~ /up\s+([0-9]+)\s+[^\s]+,\s+([0-9]+):([0-9]+)/; $uptime = "$1:$2:$3"; } else { if ($uptime =~ /day/) { if ($uptime =~ /hr/) { # 0 minutes - $uptime =~ /up\s+([0-9]+)\s+.*,\s+([0-9]+)\s+.*,/; + $uptime =~ /up\s+([0-9]+)\s+[^\s]+,\s+([0-9]+)\s+[^\s]+,/; $uptime = "$1:$2:0"; } elsif ($uptime =~ /min/) { # 0 hours - $uptime =~ /up\s+([0-9]+)\s+.*,\s+([0-9]+)\s+.*,/; + $uptime =~ /up\s+([0-9]+)\s+[^\s]+,\s+([0-9]+)\s+[^\s]+,/; $uptime = "$1:0:$2"; } else {