144 |
|
$top =~ /([^\s]+?)([MG]) real/; |
145 |
|
my($real) = $1; |
146 |
|
$real*=1024 if $2 eq "G"; |
147 |
< |
&print_pair(0, "packet.memory.real", $real); |
147 |
> |
&print_pair(0, "packet.memory.total", $real); |
148 |
|
|
149 |
|
$top =~ /([^\s]+?)([MG]) free/; |
150 |
|
my($free) = $1; |
159 |
|
$top =~ /([^\s]+?)([MG]) swap free/; |
160 |
|
my($swap_free) = $1; |
161 |
|
$swap_free*=1024 if $2 eq "G"; |
162 |
< |
&print_pair(0, "packet.memory.swap_free", $swap_free); |
162 |
> |
&print_pair(0, "packet.swap.free", $swap_free); |
163 |
|
|
164 |
|
# AJ requested total swap instead of swap_in_use, so here we go! |
165 |
< |
&print_pair(0, "packet.memory.swap_total", $swap_free + $swap_in_use); |
165 |
> |
&print_pair(0, "packet.swap.total", $swap_free + $swap_in_use); |
166 |
|
} |
167 |
|
|
168 |
|
# sub to get details of the machine's operating system. |