see proccess threades on solaris.

hagaiy
hagaiy used Ask the Experts™
on
hello.

i can i see sll the threades of a proccess on solaris ?

tx.

hagai.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
sorry about the unclear queation, i meant :
how can i see all the threades of a proccess on solaris ?

tx.
hagai.
Hi hagaiy,

   You and multiple posts for this question, please ask the CS to delete the other post and refund your points.

http://www.experts-exchange.com/Community_Support/

   Now to get back the answer of your question:

   To see the number of threads of a process
use:
   ps -fLp pid
   where:
    -L        Print information about each light weight  process
              (lwp) in each selected process. (See below.)

    LWP       The lwp ID of the lwp being reported.
    NLWP      The number of lwps in the process (if -f  is  also
              specified).

   To find out the process id of the process you want to see:

   use:
   ps -ef | grep command-name | grep -v grep


   eg if you want to see the number of threads of  process 123, use:

   ps -fLp  123


   "man ps" to find out more details

Author

Commented:
this is not what i want, i want to see the actual threads and not the lwp's, not every thread has got an lwp so this number is not always equal.
i would also like to see for each thread which function is it exceuting, do you think this is possible ?

any way, tx for youer help.
hagai.

Author

Commented:
the pstack command gave me what i looked for, tx for youer help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial