Re: how to know which cpu current process run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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....

Attachment: pgpJHvq8BAVdf.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux