From 7725f56da466db423d2c65ba1c4f4148398e1d62 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 9 Jan 2009 15:16:44 -0200 Subject: [root@emilia tuna]# tuna -t *9 -P thread ctxt_switches pid SCHED_ rtpri affinity voluntary nonvoluntary cmd 182 FIFO 85 0xff 2 0 IRQ-9 acpi 657 FIFO 85 0xff 172858 0 IRQ-19 aacraid [root@emilia tuna]# tuna -t IRQ-1* -P thread ctxt_switches pid SCHED_ rtpri affinity voluntary nonvoluntary cmd 556 FIFO 85 0xff 4 0 IRQ-1 i8042 657 FIFO 85 0xff 172867 0 IRQ-19 aacraid 686 FIFO 85 0xff 48 0 IRQ-14 libata 687 FIFO 85 0xff 2 0 IRQ-15 libata [root@emilia tuna]# tuna -t ss?d -P thread ctxt_switches pid SCHED_ rtpri affinity voluntary nonvoluntary cmd 7554 OTHER 0 0xff 39 33 sshd 31147 OTHER 0 0xff 184 81 sshd 31151 OTHER 0 0xff 3914 99 sshd 31460 OTHER 0 0xff 5477 277 sshd [root@emilia tuna]# Signed-off-by: Arnaldo Carvalho de Melo --- tuna-cmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tuna-cmd.py b/tuna-cmd.py index aadfa03..a4715bd 100755 --- a/tuna-cmd.py +++ b/tuna-cmd.py @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. -import getopt, ethtool, procfs, re, schedutils, sys +import getopt, ethtool, fnmatch, procfs, re, schedutils, sys from tuna import tuna, sysfs try: @@ -224,7 +224,7 @@ def thread_mapper(s): ps = procfs.pidstats() try: - return ps.find_by_regex(re.compile(s)) + return ps.find_by_regex(re.compile(fnmatch.translate(s))) except: return ps.find_by_name(s) -- cgit 1.2.3-korg