From: per.lanvin@inceritus.com on

(Solaris 8)

Hi,

I would like to view a certain processs and find out on which CPU it is
running.
I've tried ps -P which does not work, it only outputs "-".
The command prstat comes closer with prstat -P <CPU1>,<CPU2> ..
but the best would be if I got a full ps -ef listing where every
process had an integer associated with it that pointed out on which CPU
it is running.


Rgds

/PL

From: Atro Tossavainen on
"per.lanvin(a)inceritus.com" <per.lanvin(a)inceritus.com> writes:

> but the best would be if I got a full ps -ef listing where every
> process had an integer associated with it that pointed out on which CPU
> it is running.

top does this on Solaris

--
Atro Tossavainen (Mr.) / The Institute of Biotechnology at
Systems Analyst, Techno-Amish & / the University of Helsinki, Finland,
+358-9-19158939 UNIX Dinosaur / employs me, but my opinions are my own.
< URL : http : / / www . helsinki . fi / %7E atossava / > NO FILE ATTACHMENTS
From: Scott Howard on
per.lanvin(a)inceritus.com <per.lanvin(a)inceritus.com> wrote:
> I would like to view a certain processs and find out on which CPU it is
> running.
> I've tried ps -P which does not work, it only outputs "-".
> The command prstat comes closer with prstat -P <CPU1>,<CPU2> ..
> but the best would be if I got a full ps -ef listing where every
> process had an integer associated with it that pointed out on which CPU
> it is running.

Solaris doesn't work like that. By the time you've finished reading what
CPU something is running on, there's a good chance it's moved. Solaris
does do processor affinity to some extent (try and keep a process on the
same CPU to keep the cache fresh) but the sorts of times you're talking
are very frequently < 1 second, and often << 1 second depending on how
busy the machine is.

Scott.
From: per.lanvin@inceritus.com on

Yes and no. For example, if I start a singlethreaded app like gzip. It
will stick to its CPU for the entire run.


Rgds

/PL

From: Darren Dunham on
per.lanvin(a)inceritus.com <per.lanvin(a)inceritus.com> wrote:

> Yes and no. For example, if I start a singlethreaded app like gzip. It
> will stick to its CPU for the entire run.

It might happen by accident, but that behavior isn't guaranteed by
anything. The scheduler is allowed to stop it and restart it on another
CPU.

If nothing else is running, leaving it on the CPU is probably the best
thing to do (keeps the cache filled for that process), but if the CPUs
are busy then it's likely to jump around.

--
Darren Dunham ddunham(a)taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
 |  Next  |  Last
Pages: 1 2
Prev: automounter
Next: User monitoring In Solaris