Hi,

>  How to see process thread count. I have running my program it's show the PID
>  
>  #ps -aux
>  root  5415  0.0  0.5  68952 10892 ?        Sl   13:56   0:00
>  /opt/google/talkplugin/GoogleTalkPlugin
>
>  the GoogleTalkPlugin is the process, the process contain list of thread,
>  It's possible to show list of thread. or number of thread

That's easy. Try this at your shell prompt:

# grep ^Threads: /proc/5415/status

To know about each thread, you can look up the contents 
of /proc/5415/task/ directory.

For example, to know about the state of each thread of 
process-id 5415, the following command would help:

# grep ^State: /proc/5415/task/*/status

To know about the number of context switches for each
thread on process-id 5415, you can try a similar command 
as below:

# grep switches /proc/5415/task/*/status

The /proc filesystem is the key to get a lot of information 
about each process running on Linux, and also for a whole
lot of other kernel data structures. That's what ps command
uses internally to print information about processes on
Linux platform.

Cheers,
Chandrashekar.

-- 
Chandrashekar Babu.,
FOSS Technologist and Corporate Trainer.,
http://www.chandrashekar.info/
http://www.slashprog.com/
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to