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

Comparing projects/cms/source/host/ihost-perl/plugins/perl/i-scream_top.pl (file contents):
Revision 1.2 by tdb, Tue Dec 18 04:07:17 2001 UTC vs.
Revision 1.4 by tdb, Wed Mar 6 21:23:49 2002 UTC

# Line 32 | Line 32 | if ($ostype eq "SunOS") {
32   }
33   elsif ($ostype eq "Linux") {
34      # covers: Debian r2.2
35 <    $topbin = "/usr/bin/top -d1 -n2 -b -p0";
35 >    $topbin = "/usr/bin/top -d1 -n2 -b";
36   }
37   elsif ($ostype eq "FreeBSD") {
38      # covers: FreeBSD 4.X
# Line 146 | Line 146 | sub include_top() {
146          
147          # get RAM slightly differently
148          my($real) = `$sysctlbin -n hw.physmem`;
149 <        my($free) = $real - `$sysctlbin -n hw.usermem`;
149 >        my($v_free_count) = `$sysctlbin -n vm.stats.vm.v_free_count`;
150 >        my($v_page_size) = `$sysctlbin -n vm.stats.vm.v_page_size`;
151 >        my($free) = $v_free_count * $v_page_size;
152          
153          # turn bytes to megabytes
154          $real = ($real / 1024) / 1024;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines