mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-15 05:55:11 +08:00
e2267e68b9
The -p, -Z and -z options only show process (thread group leader) information. For example, if the thread group leader has exited, but another thread in the group is still using a socket, ss -[pZz] does not show it. Add a new option, -T (--threads), to show thread information. It implies the -p option. For example, imagine process A and thread B (in the same group) using the same socket. ss -p only shows A: $ ss -ltp "sport = 1234" State Recv-Q Send-Q Local Address:Port Peer Address:Port Process LISTEN 0 100 0.0.0.0:1234 0.0.0.0:* users:(("test",pid=2932547,fd=3)) ss -T shows A and B: $ ss -ltT "sport = 1234" State Recv-Q Send-Q Local Address:Port Peer Address:Port Process LISTEN 0 100 0.0.0.0:1234 0.0.0.0:* users:(("test",pid=2932547,tid=2932548,fd=3),("test",pid=2932547,tid=2932547,fd=3)) If -T is used, -Z and -z also show SELinux contexts for threads. Rename some variables (from "process" to "task", for example) since we use them for both processes and threads. Signed-off-by: Peilin Ye <peilin.ye@bytedance.com> Signed-off-by: David Ahern <dsahern@kernel.org> |
||
---|---|---|
.. | ||
.gitignore | ||
arpd.c | ||
ifstat.c | ||
lnstat_util.c | ||
lnstat.c | ||
lnstat.h | ||
Makefile | ||
nstat.c | ||
rtacct.c | ||
ss_util.h | ||
ss.c | ||
ssfilter_check.c | ||
ssfilter.h | ||
ssfilter.y |