diff options
author | John Kacur <jkacur@redhat.com> | 2022-09-02 11:55:07 -0400 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2022-09-30 13:24:38 -0400 |
commit | 3f1fbb092f5ef07d04fef7ddec9e538f36d84450 (patch) | |
tree | cf087ca4de96b62cf0768ce53328f4dc3a6e3a2e | |
parent | f2a28b05264fa9557192b73a1b888756748930ac (diff) | |
download | tuna-3f1fbb092f5ef07d04fef7ddec9e538f36d84450.tar.gz |
tuna: Fix matching irqs in ps_show_thread
To new format to match irqs is "irqs/"
We already test this when we call is_irq_thread(cmd):
With this fix if you do
tuna show_threads
You will get nic information that was previously missed such as
986 FIFO 50 9 69286 2 irq/164-iwlwifi:default_que
ue iwlwifi:default_queue
Signed-off-by: John Kacur <jkacur@redhat.com>
-rwxr-xr-x | tuna-cmd.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tuna-cmd.py b/tuna-cmd.py index b13b25b..80e2752 100755 --- a/tuna-cmd.py +++ b/tuna-cmd.py @@ -351,17 +351,12 @@ def ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info, sock_inodes, try: if not irqs: irqs = procfs.interrupts() - if cmd[:4] == "IRQ-": - users = irqs[tuna.irq_thread_number(cmd)]["users"] - for u in users: - if u in get_nics(): - users[users.index(u)] = "%s(%s)" % ( - u, ethtool.get_module(u)) - users = ",".join(users) - else: - u = cmd[cmd.find('-') + 1:] + users = irqs[tuna.irq_thread_number(cmd)]["users"] + for u in users: if u in get_nics(): - users = ethtool.get_module(u) + users[users.index(u)] = "%s(%s)" % ( + u, ethtool.get_module(u)) + users = ",".join(users) except: users = "Not found in /proc/interrupts!" |