29 |
|
|
30 |
|
if ($ostype eq "SunOS") { |
31 |
|
# covers: Solaris 8 |
32 |
< |
$topbin = "/usr/local/sbin/top"; |
32 |
> |
$topbin = "/usr/local/sbin/top -d2 -s1 0"; |
33 |
|
$dfbin = "/usr/bin/df"; |
34 |
|
$usersbin = "/usr/ucb/users"; |
35 |
|
$unamebin = "/usr/bin/uname"; |
37 |
|
} |
38 |
|
elsif ($ostype eq "Linux") { |
39 |
|
# covers: Debian r2.2 |
40 |
< |
$topbin = "/usr/bin/top"; |
40 |
> |
$topbin = "/usr/bin/top -d1 -n0 -b"; |
41 |
|
$dfbin = "/bin/df"; |
42 |
|
$usersbin = "/usr/bin/users"; |
43 |
|
$unamebin = "/bin/uname"; |
45 |
|
} |
46 |
|
elsif ($ostype eq "FreeBSD") { |
47 |
|
# covers: FreeBSD 4.2-STABLE |
48 |
< |
$topbin = "/usr/bin/top"; |
48 |
> |
$topbin = "/usr/bin/top -d2 -s1 0"; |
49 |
|
$dfbin = "/bin/df"; |
50 |
|
$usersbin = "/usr/bin/users"; |
51 |
|
$unamebin = "/usr/bin/uname"; |
146 |
|
sub include_top() { |
147 |
|
|
148 |
|
# Find out some numbers from top. |
149 |
< |
my(@top) = `$topbin -d2 -s1 0`; |
149 |
> |
my(@top) = `$topbin`; |
150 |
|
my($top) = join(" ", @top); |
151 |
|
$top =~ s/\n//g; |
152 |
|
|