Running "top" shows you how much CPU power is used by each process.
Suppose you have several CPUs. Is there a utility that shows you the same information as top, but for each individual CPU?
For example, if this utility is called "topp" then "topp 1" would show all the processes that run on CPU number 1, and how much power of that CPU that take. Is there such a program?
The command you're looking for is ... top
. From man top
:
12. P -- Last used CPU (SMP)
A number representing the last used processor. In a true SMP
environment this will likely change frequently since the
kernel intentionally uses weak affinity. Also, the very act
of running top may break this weak affinity and cause more
processes to change CPUs more often (because of the extra
demand for cpu time).
When running top
, you can apply filters to the processes shown. Press ?
to see the help:
As mentioned, to filter, press o(after exiting the help), then type P=N
, where N
is the desired CPU number:
Press Enter. The processes should now be only those that last ran on CPU 0.
Note that the defaault list of columns does not include the CPU number. Press f to change the fields:
Move to P
and press Spacebar to select it. When you exit the help, the column should be there:
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments