Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to determine what CPU.

Status
Not open for further replies.

pmking

IS-IT--Management
Mar 1, 2006
59
US
On Solaris 10, four CPU's.

Is there a command I can use that will show what CPU a process is using?

Hope this is the right forum for this.

Thanks.

 
I'd look at the result of man ps

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks.

I have tried man and I can't find info. So if anybody knows of the command, I would GREATLY appreciate it, and if this can even be done..

The reason for this forum is usually a last resort, I have tried the man and have searched on the internet for this... But I can't find anything.

PS will provide info about how much CPU, but from what I can gather from MAN and other resources on the net, I am not sure how to determine how to identify what cpu a process is using.

Maybe I am reading the man pages incorrectly.

Is there a way to find the process/cpu connection?



 
Just to clarify, do you mean what total CPU or which CPU?

I want to be good, is that not enough?
 
Thank you Ken,

Which CPU is my question.

 
Maby easyer ways, but this works for me:
Code:
awk -F":" '/^model\ name/ { print $2 }' /proc/cpuinfo | sort -u
 
Oh, forget that!
Only shows "what CPU you are using",
not "what CPU a process is using".
Missread the question, stupid me :-(
 
You said, "what CPU you are using". That is what I want, but also, what process a CPU is bound to.

So this command wouldn't help me?

-chris
 
It will show the CPU-type:
Code:
geir@edgy:~$ awk -F":" '/^model\ name/ { print $2 }' /proc/cpuinfo | sort -u
 Intel(R) Pentium(R) 5 CPU 2.66GHz
geir@edgy:~$
also see:
Code:
cat /proc/cpuinfo
or as user root:
Code:
dmidecode -t processor
(if available).
 
I think /proc/cpuinfo is redhat not Solaris10.

Have you tried just doing a prstat?
This will show you which cpu is servicing the process under the STATE heading.

Psrinfo -v will give you details of cpu's.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top