--- projects/cms/source/reports/rrdgraphing/watch.pl 2002/10/21 13:02:58 1.5 +++ projects/cms/source/reports/rrdgraphing/watch.pl 2003/03/10 11:34:43 1.6 @@ -28,10 +28,10 @@ # the i-scream server and collecting data. # # $Author: tdb $ -# $Id: watch.pl,v 1.5 2002/10/21 13:02:58 tdb Exp $ +# $Id: watch.pl,v 1.6 2003/03/10 11:34:43 tdb Exp $ #------------------------------------------------------------ -my($version) = '$Id: watch.pl,v 1.5 2002/10/21 13:02:58 tdb Exp $'; +my($version) = '$Id: watch.pl,v 1.6 2003/03/10 11:34:43 tdb Exp $'; $| = 1; @@ -290,8 +290,8 @@ sub processdata() { &updaterrd($machine, "users", $date, $rrdstep, \%xmlhash, @data); # paging - @data = ( "packet.pages.swapins:swapins:GAUGE", - "packet.pages.swapouts:swapouts:GAUGE", + @data = ( "packet.pages.pageins:pageins:GAUGE", + "packet.pages.pageouts:pageouts:GAUGE", ); &updaterrd($machine, "paging", $date, $rrdstep, \%xmlhash, @data); @@ -301,13 +301,36 @@ sub processdata() { my($mount) = $xmlhash{"packet.disk.p$i.attributes.mount"}; $mount =~ s/_/$hex_underscore/g; $mount =~ s/\//$hex_slash/g; - @data = ( "packet.disk.p$i.attributes.kbytes:kbytes:GAUGE", + @data = ( "packet.disk.p$i.attributes.total:total:GAUGE", "packet.disk.p$i.attributes.used:used:GAUGE", "packet.disk.p$i.attributes.totalinodes:totalinodes:GAUGE", "packet.disk.p$i.attributes.freeinodes:freeinodes:GAUGE", ); &updaterrd($machine, "disk-$mount", $date, $rrdstep, \%xmlhash, @data); ++$i; + } + + # diskio + $i = 0; + while(defined $xmlhash{"packet.diskio.p$i.attributes.name"}) { + my($name) = $xmlhash{"packet.diskio.p$i.attributes.name"}; + @data = ( "packet.diskio.p$i.attributes.rbytes:rbytes:GAUGE", + "packet.diskio.p$i.attributes.wbytes:wbytes:GAUGE", + ); + &updaterrd($machine, "diskio-$name", $date, $rrdstep, \%xmlhash, @data); + ++$i + } + + # net + $i = 0; + while(defined $xmlhash{"packet.net.p$i.attributes.name"}) { + my($name) = $xmlhash{"packet.net.p$i.attributes.name"}; + @data = ( "packet.net.p$i.attributes.rx:rx:GAUGE", + "packet.net.p$i.attributes.tx:tx:GAUGE", + ); + &updaterrd($machine, "net-$name", $date, $rrdstep, \%xmlhash, + @data); + ++$i } }