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
$
Use prstat. The number of threads is shown in the last column (NLWP = number of lightweight processes).