added PC92 stats to mrtg

This commit is contained in:
Dirk Koopman 2007-10-10 16:11:35 +01:00
parent 0cbfabaee9
commit c32170b5b0
4 changed files with 27 additions and 1 deletions

View File

@ -13,6 +13,7 @@
# hfvhf - all spots split into HF and VHF
# wwv - two graphs of WWV, one SFI and R other A and K
# wcy - WCY A and K
# pc92 - PC92 C and K, PC92 A and D
# all - all of the above
#
# b) actions
@ -139,6 +140,22 @@ if ($want{wcy} || $want{all}) {
$mc->data('wcyka', $WCY::a, $WCY::k, 'WCY A and K') unless $want{cfgonly};
}
if ($want{pc92} || $want{all}) {
$mc->cfgprint('pc92ck', [], 1024000,
"PC92 <font color=#00cc00>C</font> and <font color=#0000ff>K</font> records into $main::mycall",
'Bytes / Sec', 'C', 'K') unless $want{dataonly};
$mc->data('pc92ck', $DXProt::pc92Cin, $DXProt::pc92Kin, "PC92 C and K into $main::mycall") unless $want{cfgonly};
# $DXProt::pc92C = $DXProt::pc92K = 0;
$mc->cfgprint('pc92ad', [], 1024000,
"PC92 <font color=#00cc00>A</font> and <font color=#0000ff>D</font> records into $main::mycall",
'Bytes / Sec', 'A', 'D') unless $want{dataonly};
$mc->data('pc92ad', $DXProt::pc92Ain, $DXProt::pc92Din, "PC92 A and D into $main::mycall") unless $want{cfgonly};
# $DXProt::pc92A = $DXProt::pc92D = 0;
}
#
# do the mrtg thing
#

View File

@ -45,6 +45,7 @@ use vars qw($pc11_max_age $pc23_max_age $last_pc50 $eph_restime $eph_info_restim
$allowzero $decode_dk0wcy $send_opernam @checklist
$eph_pc15_restime $pc9x_past_age $pc9x_future_age
$pc10_dupe_age $pc92_slug_changes $last_pc92_slug
$pc92Ain $pc92Cin $pc92Din $pc92Kin
);
$pc9x_past_age = 62*60; # maximum age in the past of a px9x (a config record might be the only
@ -1651,6 +1652,8 @@ sub handle_92
}
} elsif ($sort eq 'K') {
$pc92Kin += length $line if $sort eq 'K';
# remember the last channel we arrived on
$parent->PC92C_dxchan($self->{call}) unless $self->{call} eq $parent->call;
@ -1668,6 +1671,10 @@ sub handle_92
}
} elsif ($sort eq 'A' || $sort eq 'D' || $sort eq 'C') {
$pc92Ain += length $line if $sort eq 'A';
$pc92Cin += length $line if $sort eq 'C';
$pc92Din += length $line if $sort eq 'D';
# remember the last channel we arrived on
$parent->PC92C_dxchan($self->{call}) unless $self->{call} eq $parent->call;

View File

@ -54,6 +54,8 @@ sub data
{
my ($self, $name, $vali, $valo, $title) = @_;
my $uptime = main::uptime();
$vali ||= 0;
$valo ||= 0;
if (my $m = new IO::File ">$self->{dir}/$name" ) {
$m->print("$vali\n$valo\n$uptime\n$title\n");

View File

@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
$version = '1.54';
$subversion = '0';
$build = '170';
$build = '171';
1;