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 |
|
} |
201 |
|
} |
202 |
|
$disk_info .= "</disk>"; |
203 |
|
|
204 |
+ |
print "$disk_info\n"; |
205 |
+ |
|
206 |
|
my($hostname) = hostname(); |
207 |
|
$hostname =~ s/\..*$//g; |
208 |
|
`cat /etc/resolv.conf` =~ /domain\s+([^\s]+)/; |
249 |
|
<swap>$packet{"packet.cpu.swap"}</swap> |
250 |
|
</cpu> |
251 |
|
<memory> |
252 |
< |
<total>$packet{"packet.memory.real"}</total> |
252 |
> |
<total>$packet{"packet.memory.total"}</total> |
253 |
|
<free>$packet{"packet.memory.free"}</free> |
254 |
|
</memory> |
255 |
|
<swap> |
256 |
< |
<total>$packet{"packet.memory.swap_total"}</total> |
257 |
< |
<free>$packet{"packet.memory.swap_free"}</free> |
256 |
> |
<total>$packet{"packet.swap.total"}</total> |
257 |
> |
<free>$packet{"packet.swap.free"}</free> |
258 |
|
</swap> |
259 |
|
$disk_info |
260 |
|
</packet> |