Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unix command to display all threads for a process 1

Status
Not open for further replies.

mmque

Programmer
Nov 14, 2003
5
US
Is there any unix command we can use to display the status of all threads in a multi-thread process? If so, any example to run this command?

Thanks.
 
It depends on what flavor of UNIX and what implementation of threads you are using. In some cases threads and processes are one and the same -- for example, POSIX threads in Linux...

If indeed your threads are actually processes then the "ps" command would be useful.
 
In Solaris, the command [tt]ptree[/tt] will show all processes in a process tree. See the man page for details.

Hope this helps.

 
The ptree command will show you all the parents and children of a particular process, but not the threads. The -L option to the ps command (under Solaris) will show you the threads.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top