summaryrefslogtreecommitdiff
path: root/sysutils/tcplist/files/patch-lsof.c
blob: 66fef3d7788da6dfb6b2425ddf461c3295e4f16a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
--- lsof.c.orig	2014-07-27 08:59:42.000000000 +0000
+++ lsof.c
@@ -27,7 +27,7 @@
 #define LSOFCMD  "lsof -HPsli TCP | awk '{print $3,$NF}' | sort | uniq"
 #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 -nPls -iTCP | awk '{print $3,$(NF - 1)}' | tail -n+2 | sort | uniq"
 #endif /* !OLDLSOF */
 #endif /* LSOFCMD */