| 105 |
|
sub include_disk() { |
| 106 |
|
|
| 107 |
|
# Run the df program. |
| 108 |
< |
my(@df) = `$dfbin -ak`; |
| 108 |
> |
my(@df) = `$dfbin -akl`; |
| 109 |
|
|
| 110 |
|
# Go through each line of the program, looking for each thing we want. |
| 111 |
|
my($partition_no) = 0; |
| 268 |
|
# The following need to be specified in megabytes. |
| 269 |
|
# If they are preceeded by a G, then multiply by 1024. |
| 270 |
|
|
| 271 |
< |
$top =~ /Mem:.*?([0-9]+)([KMG])\s+av/; |
| 271 |
> |
$top =~ /Mem:.*?([0-9]+)([KMG])\s+(av|total)/; |
| 272 |
|
my($real) = $1; |
| 273 |
|
$real*=1024 if $2 eq "G"; |
| 274 |
|
$real/=1024 if $2 eq "K"; |
| 280 |
|
$free/=1024 if $2 eq "K"; |
| 281 |
|
&print_pair(0, "packet.memory.free", int($free)); |
| 282 |
|
|
| 283 |
< |
$top =~ /Swap:.*?([0-9]+)([KMG])\s+av/; |
| 283 |
> |
$top =~ /Swap:.*?([0-9]+)([KMG])\s+(av|total)/; |
| 284 |
|
my($swap_total) = $1; |
| 285 |
|
$swap_total*=1024 if $2 eq "G"; |
| 286 |
|
$swap_total/=1024 if $2 eq "K"; |