[CentOS] OT: Howto to capture taskset output command

2014-02-26 Thread C. L. Martinez
Hi all, I am trying to set processor affinity for a specific process using a shell script without result. Script: #!/bin/sh -x cpu_affinity_ok=2 cpu_affinity=taskset -p -c `cat /tmp/test.pid` | awk '{print $6}' if [ -f /tmp/test.pid ]; then if [ $cpu_affinity == $cpu_affinity_ok ]; then

Re: [CentOS] OT: Howto to capture taskset output command

2014-02-26 Thread Steven Tardy
On Wed, Feb 26, 2014 at 6:57 AM, C. L. Martinez carlopm...@gmail.comwrote: if [ $cpu_affinity == $cpu_affinity_ok ]; then are you comparing strings or integers? # man test STRING1 = STRING2 the strings are equal INTEGER1 -eq INTEGER2 INTEGER1 is

Re: [CentOS] OT: Howto to capture taskset output command

2014-02-26 Thread C. L. Martinez
On Wed, Feb 26, 2014 at 12:40 PM, Steven Tardy sjt5a...@gmail.com wrote: On Wed, Feb 26, 2014 at 6:57 AM, C. L. Martinez carlopm...@gmail.comwrote: if [ $cpu_affinity == $cpu_affinity_ok ]; then are you comparing strings or integers? # man test STRING1 = STRING2

Re: [CentOS] OT: Howto to capture taskset output command

2014-02-26 Thread sjt5atra
On Feb 26, 2014, at 8:28 AM, C. L. Martinez carlopm...@gmail.com wrote: On Wed, Feb 26, 2014 at 12:40 PM, Steven Tardy sjt5a...@gmail.com wrote: On Wed, Feb 26, 2014 at 6:57 AM, C. L. Martinez carlopm...@gmail.comwrote: if [ $cpu_affinity == $cpu_affinity_ok ]; then are you

Re: [CentOS] OT: Howto to capture taskset output command

2014-02-26 Thread C. L. Martinez
On Wed, Feb 26, 2014 at 1:40 PM, sjt5atra sjt5a...@gmail.com wrote: On Feb 26, 2014, at 8:28 AM, C. L. Martinez carlopm...@gmail.com wrote: On Wed, Feb 26, 2014 at 12:40 PM, Steven Tardy sjt5a...@gmail.com wrote: On Wed, Feb 26, 2014 at 6:57 AM, C. L. Martinez carlopm...@gmail.comwrote:

Re: [CentOS] OT: Howto to capture taskset output command

2014-02-26 Thread John Doe
From: C. L. Martinez carlopm...@gmail.com I am trying to set processor affinity for a specific process using a shell script without result. Script: #!/bin/sh -x cpu_affinity_ok=2 cpu_affinity=taskset -p -c `cat /tmp/test.pid` | awk '{print $6}' if [ -f /tmp/test.pid ]; then     if

Re: [CentOS] OT: Howto to capture taskset output command

2014-02-26 Thread Tris Hoar
On 26/02/2014 13:45, C. L. Martinez wrote: On Wed, Feb 26, 2014 at 1:40 PM, sjt5atra sjt5a...@gmail.com wrote: On Feb 26, 2014, at 8:28 AM, C. L. Martinez carlopm...@gmail.com wrote: On Wed, Feb 26, 2014 at 12:40 PM, Steven Tardy sjt5a...@gmail.com wrote: On Wed, Feb 26, 2014 at 6:57 AM,

Re: [CentOS] OT: Howto to capture taskset output command

2014-02-26 Thread C. L. Martinez
On Wed, Feb 26, 2014 at 1:54 PM, Tris Hoar trish...@bgfl.org wrote: On 26/02/2014 13:45, C. L. Martinez wrote: On Wed, Feb 26, 2014 at 1:40 PM, sjt5atra sjt5a...@gmail.com wrote: On Feb 26, 2014, at 8:28 AM, C. L. Martinez carlopm...@gmail.com wrote: On Wed, Feb 26, 2014 at 12:40 PM,