--- projects/cms/source/host/generic/statgrab.pl 2001/03/21 15:38:01 1.43 +++ projects/cms/source/host/generic/statgrab.pl 2001/05/25 19:42:26 1.44 @@ -3,7 +3,7 @@ #----------------------------------------------------------------- # Machine statistics grabber # $Author: tdb $ -# $Id: statgrab.pl,v 1.43 2001/03/21 15:38:01 tdb Exp $ +# $Id: statgrab.pl,v 1.44 2001/05/25 19:42:26 tdb Exp $ # # A Perl script to return various information about a host machine # by examining the output of some common Unix/Linux commands. @@ -78,7 +78,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.43 $'; + print 'version statgrab.pl $Revision: 1.44 $'; print "\n"; } @@ -268,7 +268,7 @@ sub include_top() { # The following need to be specified in megabytes. # If they are preceeded by a G, then multiply by 1024. - $top =~ /Mem:.*?([0-9]+)([KMG])\s+av/; + $top =~ /Mem:.*?([0-9]+)([KMG])\s+(av|total)/; my($real) = $1; $real*=1024 if $2 eq "G"; $real/=1024 if $2 eq "K"; @@ -280,7 +280,7 @@ sub include_top() { $free/=1024 if $2 eq "K"; &print_pair(0, "packet.memory.free", int($free)); - $top =~ /Swap:.*?([0-9]+)([KMG])\s+av/; + $top =~ /Swap:.*?([0-9]+)([KMG])\s+(av|total)/; my($swap_total) = $1; $swap_total*=1024 if $2 eq "G"; $swap_total/=1024 if $2 eq "K";