How to find the Processor, process is running on

Hello Every OneI am running 440R a quad-cpu machine. I want to know that how I can find the on which processor what processes are running?Any help in this regard ig highly appreciated.RegardsYadwendra
[235 byte] By [yadwendrava] at [2007-11-26 21:34:21]
# 1

> Hello Every One

>

> I am running 440R a quad-cpu machine. I want to know

> that how I can find the on which processor what

> processes are running?

'prstat' or can attempt to display that, but of course most processes will migrate between processors rather rapidly. And of course multi-threaded processes can run on multiple processors simultaneously. You'd have to enable per-thread displays on 'prstat'.

Also when using 'prstat', you have the sampling problem. The only time 'prstat' can look at the CPUs is when *it* is on a CPU. Even though it only runs for a fraction of a second at a time, every time it displays, it will be running. This will skew any attempt to see what is "normally" on the CPUs.

With Solaris 10 you could use dtrace to log when individual threads were placed on or removed from a CPU. That would give you very fine-grained information about CPU dispatching.

--

Darren

Darren_Dunhama at 2007-7-10 3:15:45 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2
I'm curious as to why you would want to know this.
Chasmana at 2007-7-10 3:15:45 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 3
I probably think of a reason that collecting the statistics of different CPU may be interesting in some ways. You may know how the threads proceeded from processors side as well as to find out how to control them.
duxtria at 2007-7-10 3:15:45 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 4
you can get accurate results using glance. to have reports you must provide a small script but it has a lot of variablesto customize for printing, enjoy the documentation
Max_a at 2007-7-10 3:15:45 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 5

I'm curious as to why he would want to know this as I have been doing Capacity Planning and Performance analysis of Unix systems for many years, and never had an interest in this.

On AIX there was monitor, and there is nmon.

On HP there is glance.

These show individual process loadings, which can be relevant since both of these architectures support processor affinity.

Solaris supports what is called "processor binding" and processor sets where an application can bind itself to a processor. This provides marginal performance improvements by insuring locality of cached instructions and data. Doing this creates a management headache and nightmare. If you need dedicated processors for an application set, then use a specific server for the app. It costs less money to buy a server with one or two processors, than it does to buy a large server with many processors and then to partition it, and it is really annoying trying to account for individual processors in a server and properly reporting system usage.

As an example of the pain. At one time, in a place, there was a Stratus box that had 6 processors in it. 2 were dedicated to handling interrupts and 4 were dedicated to handling the application. Over time, system loading and workload changed to the point that this because a constriction on utilization of the system. We ended up reconfiguring it back to allowing the application and the interrupts access to all the processors. During the time of the split, I had to use a special formula and luckily had appropriate metrics to determine the calculated utilization of the box.

All the Unix's are now suffisticated enough in their scheduling and the architectures are robust enough in their data pathing, that except in very specific circumstances where you want to squeeze blood out of a turnip, it is in your best interest to just let the system share the processors among all the processes running on the box, in which case, you don't know, and don't really need to care which processor happens to be running which process and any given time.

Again, if you need dedicated processors for an app, then get it its own server. It will be much easier to manage, from all perspectives.

Chasmana at 2007-7-10 3:15:45 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 6
> On HP there is glance.am I wrong or it works also on solaris ? maybe it's not free, tough.
Max_a at 2007-7-10 3:15:45 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 7

Glance is now called GlancePlus and is part of OpenView. It can be purchased separately or in conjunction with Openview Performance Agent in the OpenView GlancePlus Pak.

GlancePlus is available from HP for HP, AIX, Solaris, LInux, NCR, and Siemens.

http://h20229.www2.hp.com/products/gplus/ds/gplus_ds.pdf

It costs money, period. If it was free, it isn't now. At least that is my understanding.

Glance and nmon are superior "real-time" monitoring tools, but be careful with Glance because it can be a pig, only because you can configure it to watch too much stuff in too short of an interval. But, it can look at things no other product that I know of can do/see.

Chasmana at 2007-7-10 3:15:45 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...