X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fnode.pl;h=9bc77e2a031f454c51c3983ce58c000c6cd4f179;hb=32849fc856cb0cb825657c0013dfefb125a96bab;hp=37db1dc8d1e21f77a4773af97f575c1fbd58a484;hpb=bff9ecf00b14e7d71d9504088a2fd7b9e5115fe1;p=spider.git diff --git a/cmd/show/node.pl b/cmd/show/node.pl index 37db1dc8..9bc77e2a 100644 --- a/cmd/show/node.pl +++ b/cmd/show/node.pl @@ -22,7 +22,15 @@ my @out; # search thru the user for nodes unless (@call) { - @call = sort map { my $ref; (($ref = DXUser->get_current($_)) && $ref->sort ne 'U') ? $_ : () } DXUser::get_all_calls; + use DB_File; + + my ($action, $count, $key, $data); + for ($action = R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = R_NEXT) { + if ($data =~ m{sort => '[ACRSX]'}) { + push @call, $key; + } + ++$count; + } } my $call; @@ -34,6 +42,7 @@ foreach $call (@call) { my $pcall = sprintf "%-11s", $call; push @out, $self->msg('snode1') unless @out > 0; if ($uref) { + $sort = "Unknwn"; $sort = "Spider" if $uref->is_spider; $sort = "AK1A " if $uref->is_ak1a; $sort = "Clx " if $uref->is_clx; @@ -53,14 +62,14 @@ foreach $call (@call) { } my ($major, $minor, $subs) = unpack("AAA*", $ver) if $ver; - if ($sort eq 'Spider') { + if ($uref->is_spider) { push @out, $self->msg('snode2', $pcall, $sort, "$ver "); } else { push @out, $self->msg('snode2', $pcall, $sort, $ver ? "$major\-$minor.$subs" : " "); } } -return (1, @out); +return (1, @out, $self->msg('rec', $count));