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

Comparing projects/cms/source/reports/rrdgraphing/watch.pl (file contents):
Revision 1.3 by tdb, Tue May 21 15:01:43 2002 UTC vs.
Revision 1.7 by tdb, Thu Mar 4 11:27:30 2004 UTC

# Line 2 | Line 2
2  
3   #
4   # i-scream central monitoring system
5 + # http://www.i-scream.org.uk
6   # Copyright (C) 2000-2002 i-scream
7   #
8   # This program is free software; you can redistribute it and/or
# Line 30 | Line 31
31   # $Id$
32   #------------------------------------------------------------
33  
34 + BEGIN {
35 +    push (@INC, "/usr/local/packages/rrdtool/lib/perl5/site_perl/5.8.2/sun4-solaris");
36 + }
37 +
38   my($version) = '$Id$';
39  
40   $| = 1;
# Line 258 | Line 263 | sub processdata() {
263              # mem
264              @data = ( "packet.memory.free:free:GAUGE",
265                        "packet.memory.total:total:GAUGE",
266 +                      "packet.memory.cache:cache:GAUGE",
267                       );
268              &updaterrd($machine, "mem", $date, $rrdstep, \%xmlhash, @data);
269                      
# Line 287 | Line 293 | sub processdata() {
293              @data = ( "packet.users.count:count:GAUGE",
294                       );
295              &updaterrd($machine, "users", $date, $rrdstep, \%xmlhash, @data);
296 <            
296 >
297 >            # paging
298 >            @data = ( "packet.pages.pageins:pageins:GAUGE",
299 >                      "packet.pages.pageouts:pageouts:GAUGE",
300 >                     );
301 >            &updaterrd($machine, "paging", $date, $rrdstep, \%xmlhash, @data);
302 >
303              # disk
304              my($i) = 0;
305              while(defined $xmlhash{"packet.disk.p$i.attributes.mount"}) {
306                  my($mount) = $xmlhash{"packet.disk.p$i.attributes.mount"};
307                  $mount =~ s/_/$hex_underscore/g;
308                  $mount =~ s/\//$hex_slash/g;
309 <                @data = ( "packet.disk.p$i.attributes.kbytes:kbytes:GAUGE",
309 >                @data = ( "packet.disk.p$i.attributes.total:total:GAUGE",
310                            "packet.disk.p$i.attributes.used:used:GAUGE",
311 +                          "packet.disk.p$i.attributes.totalinodes:totalinodes:GAUGE",
312 +                          "packet.disk.p$i.attributes.freeinodes:freeinodes:GAUGE",
313                           );
314                  &updaterrd($machine, "disk-$mount", $date, $rrdstep, \%xmlhash, @data);
315                  ++$i;
316 +            }
317 +
318 +            # diskio
319 +            $i = 0;
320 +            while(defined $xmlhash{"packet.diskio.p$i.attributes.name"}) {
321 +                my($name) = $xmlhash{"packet.diskio.p$i.attributes.name"};
322 +                @data = ( "packet.diskio.p$i.attributes.rbytes:rbytes:GAUGE",
323 +                          "packet.diskio.p$i.attributes.wbytes:wbytes:GAUGE",
324 +                         );
325 +                &updaterrd($machine, "diskio-$name", $date, $rrdstep, \%xmlhash, @data);
326 +                ++$i
327 +            }
328 +
329 +            # net
330 +            $i = 0;
331 +            while(defined $xmlhash{"packet.net.p$i.attributes.name"}) {
332 +                my($name) = $xmlhash{"packet.net.p$i.attributes.name"};
333 +                @data = ( "packet.net.p$i.attributes.rx:rx:GAUGE",
334 +                          "packet.net.p$i.attributes.tx:tx:GAUGE",
335 +                         );
336 +                &updaterrd($machine, "net-$name", $date, $rrdstep, \%xmlhash, @data);
337 +                ++$i
338 +            }
339 +
340 +            # mailq
341 +            $i = 0;
342 +            while(defined $xmlhash{"packet.mailq.p$i.attributes.name"}) {
343 +                my($name) = $xmlhash{"packet.mailq.p$i.attributes.name"};
344 +                $name =~ s/\s+//g;
345 +                @data = ( "packet.mailq.p$i.attributes.size:size:GAUGE",
346 +                         );
347 +                &updaterrd($machine, "mailq-$name", $date, $rrdstep, \%xmlhash, @data);
348 +                ++$i
349              }
350          }
351          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines