ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/ihost-perl/ihost.pl
(Generate patch)

Comparing projects/cms/source/host/ihost-perl/ihost.pl (file contents):
Revision 1.12 by pjm2, Thu Feb 1 09:24:54 2001 UTC vs.
Revision 1.15 by pjm2, Mon Feb 5 17:38:38 2001 UTC

# Line 180 | Line 180 | sub send_udp_packet() {
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      }
# Line 190 | Line 190 | sub send_udp_packet() {
190      my($disk_info) = "<disk>";
191      my($i) = 0;
192      while (defined $packet{"packet.disk.p$i.attributes.mount"}) {
193 <        $disk_info .= "<p$i>";
194 <        $disk_info .= qq/<name>$packet{"packet.disk.p$i.attributes.name"}<\/name>/;
195 <        $disk_info .= qq/<kbytes>$packet{"packet.disk.p$i.attributes.kbytes"}<\/kbytes>/;
196 <        $disk_info .= qq/<used>$packet{"packet.disk.p$i.attributes.used"}<\/used>/;
197 <        $disk_info .= qq/<avail>$packet{"packet.disk.p$i.attributes.avail"}<\/avail>/;
198 <        $disk_info .= qq/<mount>$packet{"packet.disk.p$i.attributes.mount"}<\/mount>/;
199 <        $disk_info .= "</p$i>";
193 >        $disk_info .= "<p$i";
194 >        $disk_info .= " name=\"" . $packet{"packet.disk.p$i.attributes.name"} . "\"";
195 >        $disk_info .= " kbytes=\"" . $packet{"packet.disk.p$i.attributes.kbytes"} . "\"";
196 >        $disk_info .= " used=\"" . $packet{"packet.disk.p$i.attributes.used"} . "\"";
197 >        $disk_info .= " avail=\"" . $packet{"packet.disk.p$i.attributes.avail"} . "\"";
198 >        $disk_info .= " mount=\"" . $packet{"packet.disk.p$i.attributes.mount"} . "\"";
199 >        $disk_info .= "></p$i>";
200          ++$i;
201      }
202      $disk_info .= "</disk>";
# Line 247 | Line 247 | sub send_udp_packet() {
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>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines