Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Mar 2014 07:40:01 GMT
From:      Ruslan Makhmatkhanov <cvs-src@yandex.ru>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/187240: sysutils/tcplist incompatible with sysutils/lsof
Message-ID:  <201403040740.s247e1g2017723@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/187240; it has been noted by GNATS.

From: Ruslan Makhmatkhanov <cvs-src@yandex.ru>
To: C Hutchinson <portmaster@bsdforge.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/187240: sysutils/tcplist incompatible with sysutils/lsof
Date: Tue, 04 Mar 2014 11:31:38 +0400

 This is a multi-part message in MIME format.
 --------------060708080806080001090001
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Hi,
 
 this patch will fix lsof command (it works while running manually), but 
 tcplist itself is still broken, because it doesn't output anything.
 
 By the way, doesn't sockstat(1) is what you looking for? F.e.:
 
 [rm@smeshariki4 tcplist]> sudo sockstat -4l
 USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS  FOREIGN ADDRESS
 root     sshd       84319 4  tcp4   *:22                  *:*
 mysql    mysqld     84283 10 tcp4   *:3306                *:*
 www      httpd      84169 4  tcp4   *:80                  *:*
 www      httpd      84168 4  tcp4   *:80                  *:*
 www      httpd      84167 4  tcp4   *:80                  *:*
 www      httpd      84166 4  tcp4   *:80                  *:*
 www      httpd      84165 4  tcp4   *:80                  *:*
 www      httpd      84164 4  tcp4   *:80                  *:*
 root     httpd      84163 4  tcp4   *:80                  *:*
 
 -- 
 Regards,
 Ruslan
 
 T.O.S. Of Reality
 
 --------------060708080806080001090001
 Content-Type: text/x-patch;
  name="tcplist.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="tcplist.diff"
 
 Index: files/patch-03
 ===================================================================
 --- files/patch-03	(revision 346995)
 +++ files/patch-03	(working copy)
 @@ -5,7 +5,7 @@
   #else /* !OLDLSOF */
   /* These use the current (as of 3.62W, at least) parameters for lsof */
  -#define LSOFCMD  "lsof -nPsli TCP | awk '{print $3,$NF}' | sort | uniq"
 -+#define LSOFCMD  "lsof -nPsli TCP | awk '{print $3,$(NF - 1)}' | sort | uniq"
 ++#define LSOFCMD  "lsof -nPlsTCP:LISTEN -iTCP | awk '{print $3,$(NF - 1)}' | sort | uniq"
   #endif /* !OLDLSOF */
   #endif /* LSOFCMD */
   
 
 --------------060708080806080001090001--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403040740.s247e1g2017723>