--- projects/cms/source/reports/rrdgraphing/watch.pl 2003/03/10 11:34:43 1.6 +++ projects/cms/source/reports/rrdgraphing/watch.pl 2004/03/04 11:27:30 1.7 @@ -28,11 +28,15 @@ # the i-scream server and collecting data. # # $Author: tdb $ -# $Id: watch.pl,v 1.6 2003/03/10 11:34:43 tdb Exp $ +# $Id: watch.pl,v 1.7 2004/03/04 11:27:30 tdb Exp $ #------------------------------------------------------------ -my($version) = '$Id: watch.pl,v 1.6 2003/03/10 11:34:43 tdb Exp $'; +BEGIN { + push (@INC, "/usr/local/packages/rrdtool/lib/perl5/site_perl/5.8.2/sun4-solaris"); +} +my($version) = '$Id: watch.pl,v 1.7 2004/03/04 11:27:30 tdb Exp $'; + $| = 1; use strict; @@ -259,6 +263,7 @@ sub processdata() { # mem @data = ( "packet.memory.free:free:GAUGE", "packet.memory.total:total:GAUGE", + "packet.memory.cache:cache:GAUGE", ); &updaterrd($machine, "mem", $date, $rrdstep, \%xmlhash, @data); @@ -328,8 +333,18 @@ sub processdata() { @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); + &updaterrd($machine, "net-$name", $date, $rrdstep, \%xmlhash, @data); + ++$i + } + + # mailq + $i = 0; + while(defined $xmlhash{"packet.mailq.p$i.attributes.name"}) { + my($name) = $xmlhash{"packet.mailq.p$i.attributes.name"}; + $name =~ s/\s+//g; + @data = ( "packet.mailq.p$i.attributes.size:size:GAUGE", + ); + &updaterrd($machine, "mailq-$name", $date, $rrdstep, \%xmlhash, @data); ++$i } }