X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fspotstats.pl;fp=cmd%2Fshow%2Fspotstats.pl;h=5c20a338ec74aa258a6ea9952181c707ce3af279;hb=bb3889c1d4930e2ca96b47aea10ce5e803737043;hp=0000000000000000000000000000000000000000;hpb=5d1d9d0ed0577e2459108dba8c82ab3ed591da10;p=spider.git diff --git a/cmd/show/spotstats.pl b/cmd/show/spotstats.pl new file mode 100644 index 00000000..5c20a338 --- /dev/null +++ b/cmd/show/spotstats.pl @@ -0,0 +1,23 @@ +# show the current received spot stats including +# pc11s +# pc61s +# percentage of pc11s in the total no of (unique) pc11+pc61 spots +# no of pc11s promoted to pc61 by stored ip address +# no of pc11s promoted to pc61 because a pc61 with the same data came in just after the pc11 +# no of pc11 promoted to pc61 by any means +# percentage of pc11 promoted to pc61s + +my $self = shift; +return (1, $self->msg('e5')) unless $self->priv >= 1; +my @out; + +my $r = DXProt::get_pc11_61_stats(); +#$DB::single = 1; +if ($r) { + my $spots = $r->{pc61_rx} + $r->{pc11_rx}; + my $stats = sprintf "spots pc61: $r->{pc61_rx} pc11: $r->{pc11_rx}(%0.1f%%) total: $spots - promotions - by pc61: $r->{pc11_to_61} by route: $r->{rpc11_to_61} total: $r->{promotions}(%0.1f%%)", $r->{pc11_percent}, $r->{promotions_percent}; + push @out, $stats; +} else { + push @out, qq{pc11 stats not available}; +} +return (1, @out);