From: Dirk Koopman Date: Tue, 7 Jul 2020 17:56:52 +0000 (+0100) Subject: fix (bandaid for now) sh/cl local counts X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e0e8331285f425949d9a6717e39707c4310e9ccd;p=spider.git fix (bandaid for now) sh/cl local counts --- diff --git a/Changes b/Changes index ceb72454..3627a929 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ 07Jul20======================================================================= 1. Fix show/node command. +2. Fix show/cluster command to take into account the presence of skimmer nodes + which are a new category of thing which is neither a node nor a user. 06Jul20======================================================================= 1. Add RBN.mojo with information of the RBN capabilities of DXSpider. 05Jul20======================================================================= diff --git a/cmd/show/cluster.pl b/cmd/show/cluster.pl index ea137856..7ebfb946 100644 --- a/cmd/show/cluster.pl +++ b/cmd/show/cluster.pl @@ -6,4 +6,7 @@ my $self = shift; my ($nodes, $tot, $users, $maxlocalusers, $maxusers, $uptime, $localnodes) = Route::cluster(); +$localnodes = $main::routeroot->nodes; +$users = $main::routeroot->users; + return (1, $self->msg('cluster', $localnodes, $nodes, $users, $tot, $maxlocalusers, $maxusers, $uptime)); diff --git a/perl/Route.pm b/perl/Route.pm index 9e592644..3f264846 100644 --- a/perl/Route.pm +++ b/perl/Route.pm @@ -272,10 +272,10 @@ sub cluster { my $nodes = Route::Node::count(); my $tot = Route::User::count(); - my ($users, $maxlocalusers) = DXCommandmode::user_count(); + my ($users, $maxlocalusers) = DXCommandmode::user_count(); # the user count is wrong because of skimmers my $maxusers = Route::User::max(); my $uptime = main::uptime(); - my $localnodes = $DXChannel::count - $users; + my $localnodes = $DXChannel::count - $users; # this is now wrong because of skimmers return ($nodes, $tot, $users, $maxlocalusers, $maxusers, $uptime, $localnodes);