Skip to contentSkip to conversation

Fixing cpuacct_setup.sh script

PATCH In review Lucio Correia 2 participants 2 messages Mar 10, 2010 – Mar 11, 2010

lore
Share & tools
lore
#0 lore raw

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
diff -Nurp ltp-full-20100228.orig/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh ltp-full-20100228.new/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
@@ -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
diff -Nurp ltp-full-20100228.orig/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh ltp-full-20100228.new/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
@@ -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

#1 lore raw
Quoted 13 lines · Lucio Correia

Fixes cut command. The output is empty with -f1, it should be -f2.

diff -Nurp ltp-full-20100228.orig/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh ltp-full-20100228.new/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh

testcases/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