X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fmrtg.pl;h=f60e06655ba950e577fa16e995ece4ba67814ea8;hb=36fb54df677f2db28b1e8ea098d5d492ad872896;hp=7fd950d81873f2624aeb90f273c13f14da678463;hpb=c4fc9fe526a8507baeeefa157386e62a1eafb229;p=spider.git diff --git a/cmd/mrtg.pl b/cmd/mrtg.pl index 7fd950d8..f60e0665 100644 --- a/cmd/mrtg.pl +++ b/cmd/mrtg.pl @@ -28,13 +28,12 @@ # # # -use Time::HiRes qw( clock_gettime CLOCK_PROCESS_CPUTIME_ID ); sub handle { my ($self, $line) = @_; - $DB::single = 1; +# $DB::single = 1; # create the arg list my %want; @@ -81,9 +80,9 @@ sub do_it dbg "mrtg: proc: cluster=$main::clssecs children=$main::cldsecs clock=$secs" if isdbg('mrtg'); $mc->cfgprint('proc', [qw(unknaszero withzeroes perminute)], 600, - "Processor Usage", - 'CPU 10th Secs/Min', 'Cluster Secs', 'Child Secs') unless $want{dataonly}; - $mc->data('proc', $main::clssecs*10, $main::cldsecs*10, "Processor Usage") unless $want{cfgonly}; + "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