summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-10 19:49:12 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-10 19:49:12 -0300
commita9e68d1c517bada6c1a6b88449cb614fa8fea07a (patch)
tree485e2659158d7058a8fbf18ad8301f89696bb5ca
parent21de19ed4bb2762de8ada3fe8162e01835c8825c (diff)
downloadtuna-a9e68d1c517bada6c1a6b88449cb614fa8fea07a.tar.gz
cmdline: Use tuna.cpustring_to_list in --cpus
[root@mica ~]# tuna -t 3876 -c +0x0-1,3 -m [root@mica ~]# tuna -t nscd -CP thread ctxt_switches pid SCHED_ rtpri affinity voluntary nonvoluntary cmd 3862 OTHER 0 0,1,2,3 12997 409 nscd 3875 OTHER 0 0,1,2,3 1905 126 nscd 3876 OTHER 0 0,1,3 1940 106 nscd 3877 OTHER 0 0,1,2,3 2049 130 nscd 3878 OTHER 0 0,1,2,3 1271 88 nscd 3879 OTHER 0 0,1,2,3 1243 81 nscd 3880 OTHER 0 0,1,2,3 1250 94 nscd [root@mica ~]# tuna -t 3876 -c +0x0-2 -m [root@mica ~]# tuna -t nscd -CP thread ctxt_switches pid SCHED_ rtpri affinity voluntary nonvoluntary cmd 3862 OTHER 0 0,1,2,3 13000 409 nscd 3875 OTHER 0 0,1,2,3 1909 126 nscd 3876 OTHER 0 0,1,2 1944 106 nscd 3877 OTHER 0 0,1,2,3 2054 130 nscd 3878 OTHER 0 0,1,2,3 1272 88 nscd 3879 OTHER 0 0,1,2,3 1244 81 nscd 3880 OTHER 0 0,1,2,3 1250 94 nscd [root@mica ~]# Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-xtuna-cmd.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tuna-cmd.py b/tuna-cmd.py
index 94349bf..f6f28d5 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -437,7 +437,7 @@ def main():
return
elif o in ("-c", "--cpus"):
(op, a) = pick_op(a)
- op_list = map(lambda cpu: int(cpu), a.split(","))
+ op_list = tuna.cpustring_to_list(a)
cpu_list = do_list_op(op, cpu_list, op_list)
elif o in ("-C", "--affect_children"):
affect_children = True