I want to know the threads running for a particular process in Linux?How can i know guys? I tried some commands but its not working.........
A:
What do you want to know about the threads? Try:
- Attaching gdb and using "info threads"
- Looking in /proc/<pid>/task, where the threads are listed
psmears
2010-05-17 08:44:56
A:
You can use
ps -eLf
Check this link. http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/
gsk
2010-05-17 08:46:45
i am using RHEL, this command is not working......... it is saying to use -m with ps but it is not giving proper info...... can i get in any other manner? thanks in advance
kumarasvn
2010-05-17 08:59:43
Did you use L or l? Also you can try using only ps -L. Or to know all the flags available use man ps
gsk
2010-05-17 09:29:50
You can also try giving ps first and then give ps -L pid where pid is the process id for which you want to know the thread info
gsk
2010-05-17 09:40:10
Check this link http://linux.die.net/man/1/ps
gsk
2010-05-17 09:42:47
i am giving that one only but it is asking me to use -m option for threads ........ but i am not getting properly
kumarasvn
2010-05-17 09:52:46
try ps -H. chekck the link I put in previous comment.
gsk
2010-05-17 10:14:27