Match irqs with "irqs/"
Resolves: rhbz#2131343 Signed-off-by: John Kacur <jkacur@redhat.com>
This commit is contained in:
parent
cb99fec4bd
commit
e7d521df13
|
@ -0,0 +1,52 @@
|
||||||
|
From 3f1fbb092f5ef07d04fef7ddec9e538f36d84450 Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Kacur <jkacur@redhat.com>
|
||||||
|
Date: Fri, 2 Sep 2022 11:55:07 -0400
|
||||||
|
Subject: [PATCH] tuna: Fix matching irqs in ps_show_thread
|
||||||
|
|
||||||
|
The 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>
|
||||||
|
---
|
||||||
|
tuna-cmd.py | 15 +++++----------
|
||||||
|
1 file changed, 5 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||||
|
index b13b25b8a801..80e27523acc6 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!"
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.3
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Name: tuna
|
Name: tuna
|
||||||
Version: 0.18
|
Version: 0.18
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Summary: Application tuning GUI & command line utility
|
Summary: Application tuning GUI & command line utility
|
||||||
URL: https://git.kernel.org/pub/scm/utils/tuna/tuna.git
|
URL: https://git.kernel.org/pub/scm/utils/tuna/tuna.git
|
||||||
|
@ -14,6 +14,7 @@ Requires: python3-linux-procfs >= 0.6
|
||||||
|
|
||||||
# Patches
|
# Patches
|
||||||
Patch1: tuna-Replace-python_ethtool-with-builtin-funtionalit.patch
|
Patch1: tuna-Replace-python_ethtool-with-builtin-funtionalit.patch
|
||||||
|
Patch2: tuna-Fix-matching-irqs-in-ps_show_thread.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Provides interface for changing scheduler and IRQ tunables, at whole CPU and at
|
Provides interface for changing scheduler and IRQ tunables, at whole CPU and at
|
||||||
|
@ -27,6 +28,7 @@ installed.
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
|
@ -68,6 +70,10 @@ done
|
||||||
%{_datadir}/polkit-1/actions/org.tuna.policy
|
%{_datadir}/polkit-1/actions/org.tuna.policy
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 03 2022 John Kacur <jkacur@redhat.com> - 0.18-5
|
||||||
|
- Match irqs with "irqs/"
|
||||||
|
Resolves: rhbz#2131343
|
||||||
|
|
||||||
* Fri Sep 30 2022 John Kacur <jkacur@redhat.com> - 0.18-4
|
* Fri Sep 30 2022 John Kacur <jkacur@redhat.com> - 0.18-4
|
||||||
- Remove the "Requires" of python-ethtool from the specfile
|
- Remove the "Requires" of python-ethtool from the specfile
|
||||||
Resolves: rhbz#2123751
|
Resolves: rhbz#2123751
|
||||||
|
|
Loading…
Reference in New Issue