Fixing cpuacct_setup.sh script
PATCH 1/1 Fixing cpuacct_setup.sh script
Fixes cut command. The output is empty with -f1, it should be -f2.
testcases/kernel/controllers/cpuacct/cpuacct_setup.sh +1 -1
@@ -58,7 +58,7 @@ cleanup () } task_kill () { - for i in `ps -e | grep cpuacct_taski* | cut -d" " -f1` + for i in `ps -e | grep cpuacct_taski* | cut -d" " -f2` do kill -SIGUSR1 $i done
-
Lucio Correia
Software Engineer
IBM LTC Brazil
testcases/kernel/controllers/cpuacct/cpuacct_setup.sh +1 -1
@@ -58,7 +58,7 @@ cleanup () } task_kill () { - for i in `ps -e | grep cpuacct_taski* | cut -d" " -f1` + for i in `ps -e | grep cpuacct_taski* | cut -d" " -f2` do kill -SIGUSR1 $i done
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 13 lines · Lucio Correia
Fixes cut command. The output is empty with -f1, it should be -f2.
Signed-off-by Lucio Correia <[email protected]>diff -Nurp
ltp-full-20100228.orig/testcases/kernel/controllers/cpuacct/cpuacct_setup.shltp-full-20100228.new/testcases/kernel/controllers/cpuacct/cpuacct_setup.shtestcases/kernel/controllers/cpuacct/cpuacct_setup.sh 2010-03-10 14:59:50.000000000 -0300 renamed from testcases/kernel/controllers/cpuacct/cpuacct_setup.sh 2010-03-01 11:58:28.000000000 -0300 +1
-1@@ -58,7 +58,7 @@ cleanup () } task_kill () { - for i in `ps -e | grep cpuacct_taski* | cut -d" " -f1` + for i in `ps -e | grep cpuacct_taski* | cut -d" " -f2`
Quoted 3 lines
do
kill -SIGUSR1 $i
done
That may fix it on your distro, but it's not guaranteed to be
portable as different versions of ps(1) do different things. A better idea than the one proposed above would be:
ps -eo 'pid,command' | grep cpuacct_taski | grep -v grep
Jiri may have a better idea of what to do in this case...
Thanks,
-Garrett
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list