Machine with multiple CPUs: which CPU is running which process?

Machine with multiple CPUs: which CPU is running which process?

Post by Robert Chu » Fri, 23 Oct 1998 04:00:00



We have a symmatric multiprocesssing server with 4 CPUs.  Everyone
knows how to use "ps" command to get list of running processes, but I
need to know specifically which one of four CPU is running which
process out of so many processes running in the server.  Expecially, I
would like to be able to get list of processes running on a specific
CPU among those four CPUs.  Does anybody know how to?  Thank you in
advance.

 
 
 

Machine with multiple CPUs: which CPU is running which process?

Post by Dave Marquard » Sat, 24 Oct 1998 04:00:00



> We have a symmatric multiprocesssing server with 4 CPUs.  Everyone
> knows how to use "ps" command to get list of running processes, but I
> need to know specifically which one of four CPU is running which
> process out of so many processes running in the server.  Expecially, I
> would like to be able to get list of processes running on a specific
> CPU among those four CPUs.  Does anybody know how to?  Thank you in
> advance.

You can use the "status" command in crash to see this, but of course,
if you run it a second or two later you'll see something different.
In fact, today I saw the same thread running on two processors when I
ran status, which implies that crash does some sort of sequential
reads of kernel memory to figure this out, and between figuring it out
for the first CPU and the second, crash switched to a different CPU.

-Dave

 
 
 

Machine with multiple CPUs: which CPU is running which process?

Post by Robert Kenned » Sat, 24 Oct 1998 04:00:00





> > We have a symmatric multiprocesssing server with 4 CPUs.  Everyone
> > knows how to use "ps" command to get list of running processes, but I
> > need to know specifically which one of four CPU is running which
> > process out of so many processes running in the server.  Expecially, I
> > would like to be able to get list of processes running on a specific
> > CPU among those four CPUs.  Does anybody know how to?  Thank you in
> > advance.

> On some systems, the freely available utility "top" shows which cpu on which
> a process is running in the "STATE" column. e.g.:

>   PID USERNAME THR PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
> 20594 plonka     1  27    0 2144K 1800K cpu/1   0:00  0.73% top
>                                         ^^^^^
> As an aside, your processes won't (usu.) be "pinned" to a specific processor
> so it they float amongst processors possibly as often as every context switch.
> I.e. the cpu info, if even available, would be potentially "stale" as soon
> as you see it.  Maybe it would suffice to know which processes where in the
> "run" state.

There are ways to pin processes to a specific processor.  I don't remember how,
though.  Anyone?

Quote:> However, I've noticed that AIX shows multiple "Active" ("A" in the state
> column with "ps -l" and "run" in the "STATE" column with top or
> "monitor -top") even on a uni-processor machine, so I'm wondering if that
> info isn't easily available even with access to kernel memory.

--
Robert Kennedy  -  These foolish ideas are all my own.
Boeing Space and Defense Group
Kent Space Center
System Administration - CAD/CAM

Small minds discuss people;
Average minds discuss events;
Great minds discuss ideas.





 
 
 

Machine with multiple CPUs: which CPU is running which process?

Post by Dave Marquard » Sat, 24 Oct 1998 04:00:00



> There are ways to pin processes to a specific processor.  I don't remember how,
> though.  Anyone?

Try the `bindprocessor' command.

-Dave

 
 
 

Machine with multiple CPUs: which CPU is running which process?

Post by d.. » Sat, 24 Oct 1998 04:00:00



> There are ways to pin processes to a specific processor.  I don't remember how,
> though.  Anyone?

One way is to run /usr/websm/bin/wsmprocess (or wsm)
 - select the process or processes you want
 - click on SELECTED in the tool bar
 - select "bind to a CPU"

You need the websmit LPPs installed. If you are running CDE I think
you can find it under Admin tools.

Claude Pelletier

 
 
 

1. Machine with multiple CPUs: which CPU is running which process?

We have a symmatric multiprocesssing server with 4 CPUs.  Everyone
knows how to use "ps" command to get list of running processes, but I
need to know specifically which one of four CPU is running which
process out of so many processes running in the server.  Expecially, I
would like to be able to get list of processes running on a specific
CPU among those four CPUs.  Does anybody know how to?  Thank you in
advance.

2. Bug with strace or LinuxThread?

3. Sun license manager...1%cpu...1%cpu...50%cpu50%cpu50%cpu....

4. Can't see RHL 4.1 server w/Mars-Nwe from Netware clients

5. CPU utilization for a 4 CPU machine

6. KMail & Quoted Printable

7. Q: Configure 2 CPU MP Machine as 1 CPU

8. BusLogic BT-948 SCSI card and 3C590 Etherlink III card

9. process moves from cpu to cpu?

10. How does the SMP kernel schedule processes on multiple cpu's?

11. Binding a process to a specific CPU on an SMP machine?

12. How to tell if kernel is running multiple cpus?

13. How do I know Processor/CPU characteristics on running machine???