X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fmrtg.pl;h=81190121374e5f4adefeb95a6f3b49ca7aa3a9e8;hb=e85652985b97c1f094e8046160a907365039b48c;hp=1cf1b6173e3d237c3751459025f5ba1f436579b1;hpb=c284db95120b0930059be9af46cf80afcee935ff;p=spider.git diff --git a/cmd/mrtg.pl b/cmd/mrtg.pl index 1cf1b617..81190121 100644 --- a/cmd/mrtg.pl +++ b/cmd/mrtg.pl @@ -61,6 +61,7 @@ if ($want{agw}) { } if (!$main::is_win && ($want{proc} || $want{all})) { + $ENV{COLUMNS} = 250; my $secs; my $f = new IO::File "ps aux |"; # dbg("$f"); @@ -69,7 +70,7 @@ if (!$main::is_win && ($want{proc} || $want{all})) { chomp; my $l = $_; # dbg($l); - next unless $l =~ /cluster\.p/; + next unless $l =~ m{cluster\.pl$}; my @f = split /\s+/, $l; # dbg("$f[9]"); my ($m, $s) = split /:/, $f[9]; @@ -79,7 +80,7 @@ if (!$main::is_win && ($want{proc} || $want{all})) { $f->close; } if ($secs) { - $mc->cfgprint('proc', [qw(noi)], 64000, + $mc->cfgprint('proc', [qw(noi perminute)], 64000, "Processor Usage", 'Secs', 'Secs', 'Secs') unless $want{dataonly}; $mc->data('proc', $secs, $secs, "Processor Usage") unless $want{cfgonly};