views:

41

answers:

2

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
A: 

You can use

 ps -eLf

Check this link. http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/

gsk
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
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
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
Check this link http://linux.die.net/man/1/ps
gsk
i am giving that one only but it is asking me to use -m option for threads ........ but i am not getting properly
kumarasvn
try ps -H. chekck the link I put in previous comment.
gsk