From 8fa1ac1083c4a4d1b2916933ca49d00d2fad2d8b 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 | 3 +++ cmd/show/cluster.pl | 3 +++ perl/Route.pm | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index ef150a2a..d8e3fcc1 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +07Jul20======================================================================= +1. 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. Update console.pl (dx) to improve scrolling as keyboard speed. 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