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 proc
Each thread in a process creates a directory under /proc//task. Count the number of directories, and you have the number of threads.
/proc//task