X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fmrtg.pl;h=ce1d1020652cd4cab88a99089177989293b91fea;hb=f2a65bc2f8ad7069cadc59f8fd4d2ef390567dba;hp=4a872d6172810942393cc967357689a2b90110ad;hpb=359ec70298b22aaedbe4b290d0aa2fe7ef758498;p=spider.git
diff --git a/cmd/mrtg.pl b/cmd/mrtg.pl
index 4a872d61..ce1d1020 100644
--- a/cmd/mrtg.pl
+++ b/cmd/mrtg.pl
@@ -28,7 +28,6 @@
#
#
#
-use Time::HiRes qw( clock_gettime CLOCK_PROCESS_CPUTIME_ID );
sub handle
{
@@ -76,15 +75,14 @@ sub do_it
}
if (!$main::is_win && ($want{proc} || $want{all})) {
- $ENV{COLUMNS} = 250;
- my $secs;
+ my $secs = $main::clssecs + $main::cldsecs;
- $secs = clock_gettime(CLOCK_PROCESS_CPUTIME_ID);
+ dbg "mrtg: proc: cluster=$main::clssecs children=$main::cldsecs clock=$secs" if isdbg('mrtg');
- $mc->cfgprint('proc', [qw(noi unknaszero withzeroes perminute)], 5*60,
- "Processor Usage",
- 'Proc Secs/Min', 'Proc Secs', 'Proc Secs') unless $want{dataonly};
- $mc->data('proc', $secs, $secs, "Processor Usage") unless $want{cfgonly};
+ $mc->cfgprint('proc', [qw(unknaszero withzeroes perminute)], 600,
+ "CPU Usage of node and its children in seconds",
+ 'CPU Secs/min', 'Node Secs 10ths', 'Child Secs 10ths', 0.1) unless $want{dataonly};
+ $mc->data('proc', int($main::clssecs*10+0.5), int($main::cldsecs*10+0.5), "Processor Usage") unless $want{cfgonly};
}
# do the users and nodes