--- projects/cms/source/host/ihost-perl/ihost.pl 2001/02/01 09:24:54 1.12 +++ projects/cms/source/host/ihost-perl/ihost.pl 2001/02/05 17:14:41 1.13 @@ -10,7 +10,7 @@ # - pjm2@ukc.ac.uk # # $Author: pjm2 $ -# $Id: ihost.pl,v 1.12 2001/02/01 09:24:54 pjm2 Exp $ +# $Id: ihost.pl,v 1.13 2001/02/05 17:14:41 pjm2 Exp $ #------------------------------------------------------------ $| = 1; @@ -180,7 +180,7 @@ sub send_udp_packet() { my(@statgrab) = `./statgrab.pl`; my(%packet); - for (my($i) = 0; $i < $#statgrab; $i++) { + for (my($i) = 0; $i <= $#statgrab; $i++) { $statgrab[$i] =~ /^([^\s]*) (.*)$/; $packet{$1} = $2; } @@ -201,6 +201,8 @@ sub send_udp_packet() { } $disk_info .= ""; + print "$disk_info\n"; + my($hostname) = hostname(); $hostname =~ s/\..*$//g; `cat /etc/resolv.conf` =~ /domain\s+([^\s]+)/; @@ -247,12 +249,12 @@ sub send_udp_packet() { $packet{"packet.cpu.swap"} - $packet{"packet.memory.real"} + $packet{"packet.memory.total"} $packet{"packet.memory.free"} - $packet{"packet.memory.swap_total"} - $packet{"packet.memory.swap_free"} + $packet{"packet.swap.total"} + $packet{"packet.swap.free"} $disk_info