180 |
|
|
181 |
|
my(@statgrab) = `./statgrab.pl`; |
182 |
|
my(%packet); |
183 |
< |
for (my($i) = 0; $i < $#statgrab; $i++) { |
183 |
> |
for (my($i) = 0; $i <= $#statgrab; $i++) { |
184 |
|
$statgrab[$i] =~ /^([^\s]*) (.*)$/; |
185 |
|
$packet{$1} = $2; |
186 |
|
} |
247 |
|
<swap>$packet{"packet.cpu.swap"}</swap> |
248 |
|
</cpu> |
249 |
|
<memory> |
250 |
< |
<total>$packet{"packet.memory.real"}</total> |
250 |
> |
<total>$packet{"packet.memory.total"}</total> |
251 |
|
<free>$packet{"packet.memory.free"}</free> |
252 |
|
</memory> |
253 |
|
<swap> |
254 |
< |
<total>$packet{"packet.memory.swap_total"}</total> |
255 |
< |
<free>$packet{"packet.memory.swap_free"}</free> |
254 |
> |
<total>$packet{"packet.swap.total"}</total> |
255 |
> |
<free>$packet{"packet.swap.free"}</free> |
256 |
|
</swap> |
257 |
|
$disk_info |
258 |
|
</packet> |