X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fconnect.pl;h=4644d5c9d6bd497dbe79524e410cf7bdeb065126;hb=a90885c5c10b837b05ef1ebf718fd88e428a3c91;hp=708113769fbb74008d17b6c8c493efd4909233ef;hpb=70928ea2832755c4bcd8f4d04fc0acc3861a4496;p=spider.git diff --git a/cmd/show/connect.pl b/cmd/show/connect.pl index 70811376..4644d5c9 100644 --- a/cmd/show/connect.pl +++ b/cmd/show/connect.pl @@ -11,22 +11,31 @@ 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; - if ($c =~ /^Server\s+(\S+)$/) { + my $addr; + + if ($c =~ /^Server\s+(\S+)/) { $addr = $1; $c = "Server"; + } else { + $addr = "AGW Port ($r->{agwport})" if exists $r->{agwport}; + $addr = "BPQ Stream ($r->{bpqstream})" if exists $r->{bpqstream}; + + $addr ||= "$r->{peerhost}/$r->{peerport}"; + $addr ||= "Unknown"; } - 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);