How can I monitor the thread count of a process on linux?

zorro_velcro picture zorro_velcro · Nov 6, 2008 · Viewed 279.8k times · Source

I would like to monitor the number of threads used by a specific process on Linux. Is there an easy way to get this information without impacting the performance of the process?

Answer

slav0nic picture slav0nic · Nov 7, 2008

try

ps huH p <PID_OF_U_PROCESS> | wc -l

or htop