How to list all threads in a running process


 
Thread Tools Search this Thread
Operating Systems AIX How to list all threads in a running process
# 1  
Old 02-22-2011
[Solved] How to list all threads in a running process

Hello,

On Linux, I can use 'ps -efL | grep process_name' to list all threads that belong to a running process. -L has a different meaning on AIX and I could not find an equivalent flag in the man pages.

Does anyone know of a way to dump the threads under a running process?

Thanks,
Hubert
# 2  
Old 02-23-2011
depending on your OS

Code:
man ptree

Code:
man pstree

Code:
man truss
man tusc
man strace

# 3  
Old 02-23-2011
Thanks, after some further digging, I found what I was looking for in the man pages:

Code:
ps -mo THREAD -p <pid>

Moderator's Comments:
Mod Comment edit by bakunin: thanks for posting the solution as a follow-up. Thread title edited.

Last edited by bakunin; 02-24-2011 at 07:03 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

List Process running under current user

Hi, i need to list the processes running only under current logged in user. EX: $ whoami oraaqw $ ps -ef | grep tnslsnr oraaqw 11403300 19267592 0 09:14:47 pts/3 0:00 grep tnslsnr oraaqw 15794208 1 0 Jan 14 - 11:59... (6 Replies)
Discussion started by: aravindadla
6 Replies

2. UNIX for Dummies Questions & Answers

How do i list running process with the ports they are using?

How do i list the running process and also view the ports they are listening to at the same time? (3 Replies)
Discussion started by: mena
3 Replies

3. UNIX for Advanced & Expert Users

How to determine the number of NFS threads RUNNING on the system

Hi, Anyone can tell me how to get the number of NFS threads RUNNING on the system for Solaris 10? Someone told me for Solaris 9, the method is "echo "*svc$<svcpool" | adb -k. But, I've tried to google the method for Solaris 10 and did not find the corresponding method, please help... (1 Reply)
Discussion started by: wang.caiqi
1 Replies

4. Shell Programming and Scripting

Return code for parallel running threads

Hi, How to use the return code, for parallel running threads. Ex- grep pattern1 file1 file2 file3 file4 & grep pattern1 file5 file6 file7 file8 & grep pattern1 file9 file10 file11 file12 & return_code=$? if (return_code -eq 0) then echo "pattern found" else echo... (2 Replies)
Discussion started by: jitendriya.dash
2 Replies

5. Solaris

Number of threads running

Is there any command to find 1) the number of threads running 2) kernel boot mode in solaris box (2 Replies)
Discussion started by: vickylife
2 Replies

6. UNIX for Advanced & Expert Users

threads per process

What are the maximum number of threads possible per Process? Is it OS dependent? (1 Reply)
Discussion started by: digdarshan
1 Replies

7. UNIX for Advanced & Expert Users

how to identify running threads using commands

Dear All, I am developing one project using QT Designer 3.3.5. In my project contain 27-pthreads and 5-RT Task. how to i know how many threads are currently running in my application using linux command. I was try ps -ef , but it doesn't show the threads. kindly help me with is regards. (3 Replies)
Discussion started by: rajamohan
3 Replies

8. Shell Programming and Scripting

how to get the list of process running in the server from the local machin n unix ?

how to get the list of process running in the server from the local machin n unix ? (3 Replies)
Discussion started by: guhas
3 Replies

9. HP-UX

how to see the threads count of a process in hp unix?

hi,all: how to see the threads count of a process in hp unix? thanks (2 Replies)
Discussion started by: bugbugbug
2 Replies

10. Programming

Count Number Of Threads in a Process

I am trying to find out that how many number of threads are currently running or in any other state which is created by POSIX standard in a process. First I have defined a variable called proc_var of type proc defined in sys/proc.h.Next I open up the dir /proc and per directory wise I do an ioctl... (7 Replies)
Discussion started by: S.P.Prasad
7 Replies
Login or Register to Ask a Question