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=8fa1ac1083c4a4d1b2916933ca49d00d2fad2d8b;p=spider.git fix (bandaid for now) sh/cl local counts --- 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);