From e0e8331285f425949d9a6717e39707c4310e9ccd Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Tue, 7 Jul 2020 18:56:52 +0100 Subject: [PATCH] fix (bandaid for now) sh/cl local counts --- Changes | 2 ++ cmd/show/cluster.pl | 3 +++ perl/Route.pm | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) 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); -- 2.34.1