How to get the thread count of a process
I recently had to check the number of threads being created by a process, for instance, a java application.
We can do the same using the following:
shell
$ ps -o thcount <pid>
Use watch
to monitor the same every 2 seconds.
shell
$ watch ps -o thcount <pid>