6

I know the pid of the process. top -H -p <pid> works on Linux, but I am not able to get it running on Solaris:

$ top -H -p 3677 /usr/local/packages/top/bin/top-default: illegal option -- H Top version 3.5beta7 Usage: top-default [-ISbinqu] [-d x] [-s x] [-o field] [-U username] [number] $ top -p 3677 /usr/local/packages/top/bin/top-default: illegal option -- p Top version 3.5beta7 Usage: top-default [-ISbinqu] [-d x] [-s x] [-o field] [-U username] [number] 

What are the options that I have to find the number of threads a process is using on Solaris?

$ uname SunOS $ 

1 Answer 1

8

Use prstat. The number of threads is shown in the last column (NLWP = number of lightweight processes).

$ prstat -p 1124,4152,1144 PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 1144 jlliagre 22M 11M sleep 59 0 4:16:05 2.2% multiload-apple/1 4152 jlliagre 374M 182M sleep 59 0 0:24:53 0.9% firefox-bin/11 1124 jlliagre 71M 52M sleep 59 0 0:31:50 0.2% java/20 Total: 3 processes, 32 lwps, load averages: 0.14, 0.12, 0.11 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.