how to know which cpu current process run
Valdis.Kletnieks at vt.edu
Valdis.Kletnieks at vt.edu
Thu Aug 15 08:57:57 EDT 2013
On Thu, 15 Aug 2013 20:24:21 +0800, loody said:
> is there any shell command or tool can let me know which cpu current
> process run on?
Why are you trying to check from the shell? What problem are you
trying to solve by knowing which CPU?
(The problem is that it's inherently *very* racy - the process could easily
get bounced across 2 or 3 different CPUs in the amount of time it takes
a shell command to check - and on large SGI UV boxes under sufficient memory
thrashing, it could bounce across 50 or 60 different cores while you check).
And checking the *current* process tells you even less than "checking the
process you care about" - because unless it's a shell builtin, when you
launch the command, it will quite possibly end up on some core other than
the one the shell is running on....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130815/ee2ccdef/attachment.bin
More information about the Kernelnewbies
mailing list