diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-11-28 15:26:06 -0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-11-28 15:26:06 -0200 |
commit | fcfcd1d7530d1c5ff07faf773b05671fa0fbc925 (patch) | |
tree | 39d0b2d9b95e2c670d27936bdb27a3d99f04388b | |
parent | beb11453cd8d90b62b2b17acacf73a871aad97c5 (diff) | |
download | tuna-fcfcd1d7530d1c5ff07faf773b05671fa0fbc925.tar.gz |
cmdline: Commands should affect both -q and -t if they are present
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-x | tuna-cmd.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tuna-cmd.py b/tuna-cmd.py index 5fc22c0..ad3303e 100755 --- a/tuna-cmd.py +++ b/tuna-cmd.py @@ -152,23 +152,27 @@ def ps_show(ps, affect_children, cpuinfo, irqs, thread_list, cpu_list, ps_list = [] for pid in ps.keys(): - if thread_list and pid not in thread_list: - continue iskth = tuna.iskthread(pid) if not show_uthreads and not iskth: continue if not show_kthreads and iskth: continue + in_irq_list = False if irq_list_numbers: if tuna.is_hardirq_handler(ps, pid): try: irq = int(ps[pid]["stat"]["comm"][4:]) if irq not in irq_list_numbers: - continue + if not thread_list: + continue + else: + in_irq_list = True except: pass elif not thread_list: continue + if not in_irq_list and thread_list and pid not in thread_list: + continue try: affinity = schedutils.get_affinity(pid) except SystemError: # (3, 'No such process') |