change the type of unit for spots
[spider.git] / cmd / mrtg.pl
index a2fd6c446ea1c743e4d0b988d42e10b66c8d0425..0d027b9a39f7f66b97b9bbe796a3abd5cf1cbf2e 100644 (file)
@@ -25,7 +25,7 @@
 #
 # Copyright (c) 2002 Dirk Koopman G1TLH
 #
-# $Id$
+#
 #
 
 my ($self, $line) = @_;
@@ -71,6 +71,7 @@ if (!$main::is_win && ($want{proc} || $want{all})) {
                        my $l = $_;
 #                      dbg($l);
                        next unless $l =~ m{cluster\.pl$};
+                       next if $l =~ m{bash\s+\-c};
                        my @f = split /\s+/, $l;
 #                      dbg("$f[9]");
                        my ($m, $s) = split /:/, $f[9];
@@ -80,7 +81,7 @@ if (!$main::is_win && ($want{proc} || $want{all})) {
                $f->close;
        }
        if ($secs) {
-               $mc->cfgprint('proc', [qw(noi perminute)], 5*60, 
+               $mc->cfgprint('proc', [qw(noo 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};
@@ -108,7 +109,7 @@ if ($want{totalusers} || $want{all}) {
 
 # do the total spots
 if ($want{totalspots} || $want{all}) {
-       $mc->cfgprint('totalspots',  [qw(unknaszero gauge noi)], 1000, 'Total Spots',
+       $mc->cfgprint('totalspots',  [qw(unknaszero absolute noi)], 1000, 'Total Spots',
                         'Spots / min', 'Spots', 'Spots') unless $want{dataonly};
        $mc->data('totalspots', $Spot::totalspots, $Spot::totalspots, 'Total Spots') unless $want{cfgonly};
        $Spot::totalspots = 0;
@@ -116,7 +117,7 @@ if ($want{totalspots} || $want{all}) {
 
 # do the HF and VHF spots
 if ($want{hfvhf} || $want{all}) {
-       $mc->cfgprint('hfspots', [qw(unknaszero gauge)], 1000, '<font color=#00cc00>HF</font> and <font color=#0000ff>VHF+</font> Spots',
+       $mc->cfgprint('hfspots', [qw(unknaszero absolute)], 1000, '<font color=#00cc00>HF</font> and <font color=#0000ff>VHF+</font> Spots',
                         'Spots / min', 'HF', 'VHF') unless $want{dataonly};
        $mc->data('hfspots', $Spot::hfspots, $Spot::vhfspots, 'HF and VHF+ Spots') unless $want{cfgonly};
        $Spot::hfspots = $Spot::vhfspots = 0;
@@ -125,7 +126,7 @@ if ($want{hfvhf} || $want{all}) {
 # wwv stuff
 if ($want{wwv} || $want{all}) {
        $mc->cfgprint('wwvsfi', [qw(gauge)], 1000, 'WWV <font color=#00cc00>SFI</font> and <font color=#0000ff>R</font>', 'SFI / R', 'SFI', 'R') unless $want{dataonly};
-       $mc->data('wwvsfi', ($Geomag::r || $WCY::r), ($Geomag::sfi || $WCY::sfi), 'WWV SFI and R') unless $want{cfgonly};
+       $mc->data('wwvsfi', ($Geomag::sfi || $WCY::sfi), ($Geomag::r || $WCY::r), 'WWV SFI and R') unless $want{cfgonly};
        $mc->cfgprint('wwvka', [qw(gauge)], 1000, 'WWV <font color=#00cc00>A</font> and <font color=#0000ff>K</font>',
                         'A / K', 'A', 'K') unless $want{dataonly};
        $mc->data('wwvka', $Geomag::a, $Geomag::k, 'WWV A and K') unless $want{cfgonly};
@@ -141,5 +142,11 @@ if ($want{wcy} || $want{all}) {
 # 
 # do the mrtg thing
 #
-my @out = $mc->run unless $want{nomrtg};
+
+my @out;
+{
+local %ENV;
+$ENV{LANG} = 'C';
+@out = $mc->run unless $want{nomrtg};
+}
 return (1, @out);