X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fconnect.pl;h=98211ddfd31b3dc9d6560fb8d0fa1d8119d703f1;hb=6374fb31da62987e676244c38eb6cf73c81bf891;hp=708113769fbb74008d17b6c8c493efd4909233ef;hpb=7f13dbae516120247c76b132354204cd66ba4515;p=spider.git diff --git a/cmd/show/connect.pl b/cmd/show/connect.pl index 70811376..98211ddf 100644 --- a/cmd/show/connect.pl +++ b/cmd/show/connect.pl @@ -11,22 +11,27 @@ return (1, $self->msg('e5')) if $self->priv < 1; my @out; my $count; -push @out, "Cnum Call Address/Port State Type Dir."; +push @out, "Cnum Call Address/Port State Type Dir. Module"; foreach my $call (sort keys %Msg::conns) { my $r = $Msg::conns{$call}; - my $addr = "$r->{peerhost}/$r->{peerport}"; my $c = $call; + my $addr; + if ($c =~ /^Server\s+(\S+)$/) { $addr = $1; $c = "Server"; + } else { + $addr = "$r->{peerhost}/$r->{peerport}"; } - push @out, sprintf(" %3d %-9s %-27.27s %3s %7s %8s", + my $csort = $r->{csort} || ''; + my $sort = $r->{sort} || ''; + push @out, sprintf(" %3d %-9s %-27.27s %3s %7s %8s %-8s", $r->{cnum}, $c, $addr, $r->{state}, - $r->{csort}, $r->{sort}); + $csort, $sort, ref $r); $count++; } -push @out, "$count Connections"; +push @out, "$count Connections ($Msg::noconns Allocated)"; return (1, @out);