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.10 by pjm2, Mon Jan 22 17:17:48 2001 UTC vs.
Revision 1.11 by pjm2, Mon Jan 22 17:23:25 2001 UTC

# Line 138 | Line 138 | sub include_top() {
138      # If they are preceeded by a G, then multiply by 1024.  
139  
140      $top =~ /([^\s]+?)([MG]) real/;
141 <    my($real) = $1*1024 if $2 eq "G";
141 >    my($real) = $1;
142 >    $real*=1024 if $2 eq "G";
143      &print_pair(1, "packet.memory.real", $real);
144  
145      $top =~ /([^\s]+?)([MG]) free/;
146 <    my($free) = $1*1024 if $2 eq "G";
146 >    my($free) = $1;
147 >    $free*=1024 if $2 eq "G";
148      &print_pair(1, "packet.memory.free", $free);
149  
150      $top =~ /([^\s]+?)([MG]) swap in use/;
151 <    my($swap_in_use) = $1*1024 if $2 eq "G";
151 >    my($swap_in_use) = $1;
152 >    $swap_in_use*=1024 if $2 eq "G";
153      &print_pair(1, "packet.memory.swap_in_use", $swap_in_use);
154  
155      $top =~ /([^\s]+?)([MG]) swap free/;
156 <    my($swap_free) = $1*1024 if $2 eq "G";
156 >    my($swap_free) = $1;
157 >    $swap_free*=1024 if $2 eq "G";
158      &print_pair(1, "packet.memory.swap_free", $swap_free);
159   }
160  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines