From: Peilin Ye <yepeilin.cs@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
David Ahern <dsahern@kernel.org>,
netdev@vger.kernel.org
Cc: Peilin Ye <peilin.ye@bytedance.com>,
Richard Haines <richard_c_haines@btinternet.com>,
Cong Wang <cong.wang@bytedance.com>,
Peilin Ye <yepeilin.cs@gmail.com>
Subject: [PATCH iproute2-next 0/7] ss: Introduce -T, --threads option
Date: Tue, 24 May 2022 19:51:15 -0700 [thread overview]
Message-ID: <cover.1653446538.git.peilin.ye@bytedance.com> (raw)
From: Peilin Ye <peilin.ye@bytedance.com>
Hi all,
This patchset adds a new ss option, -T (--threads), to show thread
information. It extends the -p (--processes) option, and should be useful
for debugging, monitoring multi-threaded applications. Example output:
$ 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))
It implies -p i.e. it outputs all threads in the thread group, including
the thread group leader. When -T is used, -Z and -z also show SELinux
contexts for threads.
[1-5/7] are small clean-ups for the user_ent_hash_build() function. [6/7]
factors out logic iterating $PROC_ROOT/$PID/fd/ from user_ent_hash_build()
to make [7/7] easier. [7/7] actually implements the feature.
Thanks,
Peilin Ye (7):
ss: Use assignment-suppression character in sscanf()
ss: Remove unnecessary stack variable 'p' in user_ent_hash_build()
ss: Do not call user_ent_hash_build() more than once
ss: Delete unnecessary call to snprintf() in user_ent_hash_build()
ss: Fix coding style issues in user_ent_hash_build()
ss: Factor out fd iterating logic from user_ent_hash_build()
ss: Introduce -T, --threads option
man/man8/ss.8 | 8 +-
misc/ss.c | 230 +++++++++++++++++++++++++++++---------------------
2 files changed, 142 insertions(+), 96 deletions(-)
--
2.20.1
next reply other threads:[~2022-05-25 2:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 2:51 Peilin Ye [this message]
2022-05-25 2:51 ` [PATCH iproute2-next 1/7] ss: Use assignment-suppression character in sscanf() Peilin Ye
2022-05-25 2:52 ` [PATCH iproute2-next 2/7] ss: Remove unnecessary stack variable 'p' in user_ent_hash_build() Peilin Ye
2022-05-25 2:52 ` [PATCH iproute2-next 3/7] ss: Do not call user_ent_hash_build() more than once Peilin Ye
2022-05-25 2:52 ` [PATCH iproute2-next 4/7] ss: Delete unnecessary call to snprintf() in user_ent_hash_build() Peilin Ye
2022-05-25 2:53 ` [PATCH iproute2-next 5/7] ss: Fix coding style issues " Peilin Ye
2022-05-25 2:53 ` [PATCH iproute2-next 6/7] ss: Factor out fd iterating logic from user_ent_hash_build() Peilin Ye
2022-05-25 2:53 ` [PATCH iproute2-next 7/7] ss: Introduce -T, --threads option Peilin Ye
2022-05-30 16:00 ` [PATCH iproute2-next 0/7] " patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1653446538.git.peilin.ye@bytedance.com \
--to=yepeilin.cs@gmail.com \
--cc=cong.wang@bytedance.com \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peilin.ye@bytedance.com \
--cc=richard_c_haines@btinternet.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).