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.41 by tdb, Tue Mar 20 13:04:22 2001 UTC vs.
Revision 1.42 by pjm2, Wed Mar 21 10:51:32 2001 UTC

# Line 268 | Line 268 | sub include_top() {
268          # The following need to be specified in megabytes.
269          # If they are preceeded by a G, then multiply by 1024.  
270          
271 <        $top =~ / ([0-9]+?)([KMG]) av/;
271 >        $top =~ /Mem:.*?([0-9]+)([KMG])\s+av/;
272          my($real) = $1;
273          $real*=1024 if $2 eq "G";
274          $real/=1024 if $2 eq "K";
275          &print_pair(0, "packet.memory.total", int($real));
276          
277 <        $top =~ / ([0-9]+?)([KMG]) free/;
277 >        $top =~ /Mem:.*?([0-9]+)([KMG])\s+free/;
278          my($free) = $1;
279          $free*=1024 if $2 eq "G";
280          $free/=1024 if $2 eq "K";
281          &print_pair(0, "packet.memory.free", int($free));
282          
283 <        $top =~ /Swap:\s+([0-9]]+?)([KMG]) av/;
283 >        $top =~ /Swap:.*?([0-9]]+)([KMG])\s+av/;
284          my($swap_total) = $1;
285          $swap_total*=1024 if $2 eq "G";
286          $swap_total/=1024 if $2 eq "K";
287          &print_pair(0, "packet.swap.total", int($swap_total));
288          
289 <        $top =~ /Swap:.*, ([0-9]+?)([KMG]) free/;
289 >        $top =~ /Swap:.*?([0-9]+)([KMG])\s+free/;
290          my($swap_free) = $1;
291          $swap_free*=1024 if $2 eq "G";
292          $swap_free/=1024 if $2 eq "K";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines