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:
$ ps -o thcount <pid>
watchto monitor the same every 2 seconds.
$ watch ps -o thcount <pid>