Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: solaris cpus

Re: solaris cpus

From: Nathan Dietsch <njd_at_ndietsch.com>
Date: Wed, 30 Aug 2006 16:13:48 +1000
Message-ID: <44F52C9C.6070709@ndietsch.com>


Hello Joe,

BN wrote:

> Greetings
>
> Try prstat

prstat(1m) will report on processor usage and can even be used to report on processor sets, but it will not do the actual binding for you.

> On 8/28/06, *Joe Smith* <joe_dba_at_hotmail.com
> <mailto:joe_dba_at_hotmail.com>> wrote:
>
> How can I tie a specific process to a cpu on sun solaris? mpstat
> gives cpu
> stats, but does not tell me which process is running on a given cpu.
>

Your question is a little confusing, you ask how to tie a process to a specific CPU, then you say that mpstat gives CPU stats. If you are looking to bind a process to a specific CPU, then pbind(1m) is the command you want. To bind a process (and all subsequent threads) to a process, follow these steps

# Determine the PID of the process
ps -fu oracle | grep arch (example)

# Determine the list of processors on your system and pick one psrinfo

# Bind the PID to the chosen CPU (0)
pbind -b 0 ${PID FROM PREVIOUS COMMAND}

If, you are trying to report on the processor usage of a single process, you can do this with prstat, namely with the -p option. If you are using a Solaris version prior to Solaris 8, you can use the following;

ps -fp ${PID FROM PREVIOUS COMMAND} -o pcpu

I hope this helps.

Kind Regards,

Nathan Dietsch

>
> thanks.
>
> _________________________________________________________________
> Windows Live Spaces is here! It's easy to create your own personal
> Web site.
> http://spaces.live.com/signup.aspx
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
>
>
> --
> Regards & Thanks
> BN

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Aug 30 2006 - 01:13:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US