For me, sysutils/tcplist stopped working, about 1.5yrs agao. I really miss it. So Here's a PR, in hopes it can/will be fixed. Basically, when using it with, or without options, it always emits the same output/error: # tcplist lsof: unknown -s protocol: "li" lsof 4.88 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man usage: [-?abChKlnNoOPRtUvV] [+|-c c] [+|-d s] [+|-D D] [+|-f[cfgGn]] [-F [f]] [-g [s]] [-i [i]] [-k k] [+|-L [l]] [-m m] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names] Use the ``-h'' option to get more help information. tcplist: Can't get lsof output header Nothing more, nothing less. All versions (tcplist/lsof) are current as of end of Feb 27 2014. Thank you for all your time, and consideration. --Chris Fix: unknown How-To-Repeat: install / use sysutils/tcplist
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
So, this is proper lsof commandline. It outputs like: uid x.x.x.x:10859->y.y.y.y:22 uid x.x.x.x:16573->y.y.y.y:80 uid x.x.x.x:19337->y.y.y.y:80 and tcplist now fails with: select: Bad file descriptor Looks like the code needs to be updated to modern network stuff. -- Regards, Ruslan T.O.S. Of Reality
Greetings, Ruslan, and thank you very much for the response. > Hi, > > this patch will fix lsof command (it works while running manually), but > tcplist itself is still broken, because it doesn't output anything. Ahh, I see. Thanks for taking the time to do this. > > 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 *:* Indeed. In my struggle to retreive similar output from something else, I remembered sockstat(1). :) > > -- > Regards, > Ruslan > > T.O.S. Of Reality > Thanks again, for all your time, and attention to this. --Chris
There is no maintainer for this port, so somebody should commit Ruslan's patch
A commit references this bug: Author: marino Date: Sun Jul 27 09:05:49 UTC 2014 New revision: 363030 URL: http://svnweb.freebsd.org/changeset/ports/363030 Log: sysutils/tcplist: Fix compatiblity with sysutils/lsof PR: 187240 Submitted by: Chris Hutchinson Fix by: Ruslan Changes: head/sysutils/tcplist/Makefile head/sysutils/tcplist/files/patch-03
Okay, fix is in!
Excellent work, as usual John. Thank you! You still get my vote for Commit Bit of the year. :) --Chris