sockstat aint workin'

YONETANI Tomokazu qhwt+dfly at les.ath.cx
Thu Oct 28 01:38:42 PDT 2004


On Thu, Oct 28, 2004 at 10:19:28AM +0200, Erik P. Skaalerud wrote:
> sockstat is still fubar (it doesnt show proto).
> 
> Can anyone please fix this soon, as this is a very valuable tool to have 
> working :-)
> 
> Example (Notice that PROTO is zeroed):
> [root at dragon:~]$ sockstat -4
> USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
> postfix  smtpd    13830    6 0      *:25                  *:

Here you are :)

--- sockstat.orig	2004-10-16 18:12:21.000000000 +0900
+++ sockstat	2004-10-28 17:31:35.000000000 +0900
@@ -113,7 +113,7 @@
 	next if (!$listen && $nsd->[6] eq '*.*');
 	printf($inet_fmt, $fsd->[0], $fsd->[1], $fsd->[2],
 	       substr($fsd->[3], 0, -1),
-	       $nsd->[1], addr($nsd->[5]), addr($nsd->[6]));
+	       $nsd->[2], addr($nsd->[5]), addr($nsd->[6]));
     }
     print("\n");
 }





More information about the Bugs mailing list