Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] process and affinity

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] process and affinity


Chronological Thread 
  • From: Mark Foster <>
  • To: <>
  • Subject: Re: [perfsonar-user] process and affinity
  • Date: Tue, 3 Feb 2015 10:24:58 -0800

When you want to monitor a specified process and assigned core, you can also
use pidstat:

pidstat -u -p 30 4

shows the cpu used by process id# 30 on 4 second intervals.
Note the process id can be a list X,Y,Z

I've found this useful when, e.g., I'm running nuttcp, where I've used the
process affinity option to bind the process to a core.

-- Mark

On 2/3/2015 9:46 AM, Azher Mughal wrote:
Ah ... "f" option for top is useful. Next option is 'j' which adds a P column
for the SMP core.

Thanks
-Azher

On 2/3/2015 9:42 AM, Tom Throckmorton wrote:
On Tue, Feb 3, 2015 at 11:14 AM, Azher Mughal
<

<mailto:>>
wrote:

Hi All,

I thought you might have some better hints.

As you know that running processes can be mapped to different CPU cores
(irqbalance or manual). By default process affinity is f or ff etc.
based on the number of available cores.

Is there a way (other than taskset or poking /proc) to see which process
is using which core , I mean through some some Linux tool ? I tried
htop, top, atop, mpstat ... but they tell a summary of total core usage,
but not about that specific process which just consumed 40% of that core.


Couple of ways:

1) ps -F wlll show the PSR, which is the processor that process is currently
assigned to

2) recent top version can be taught to show it (in top, f to select fields
mgmt, then select P)

I believe htop can as well, but don't have that installed at the moment, and
can't recall the invocation.

cheers,

-tt


An alternate way could be to get a process list and force taskset the
interested ones.

Thanks
-Azher



--
This message has been scanned for viruses and
dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
believed to be clean.




Archive powered by MHonArc 2.6.16.

Top of Page