How to check available Threads (Application Threads) in J2EE

If you get the Alert: High Number of Used System Threads for a Java System.

Some J2EE nodes show a high usage of the system thread pool. The system thread pool is used for system-internal tasks like inter-J2EEnode communication.

To check the available Threads:

At Os Level:

This is from SAP KBA 1625458 - How to find the status of the threads being used by the J2EE server.

 To find the status of the application and the system threads being used by the J2EE server, do the following:

  1. Open telnet connection to the server (eg: telnet <hostname>:<telnet port>) and login with a J2EE administrator user.
  2. > lsc (to list the available servernodes)
  3. > jump <servernode> (usually jump 0)
  4. > add debug (debug is a group of commands for monitoring of basic core managers).
  5. > debugmanager ThreadManager (gives the status of the system threads) and > debugmanager ApplicationThreadManager (gives the status of the application threads).
  6. In the above example, CurrentSize shows the number of threads running at the moment and MaxSize shows the maximum number of threads that have been configured to reside in the thread pool. If the value of CurrentSize is equal to the MaxSize, then there are no more free threads available on the server. In such cases, add more threads (application or system threads) as per SAP Note 1016241 using the configtool application.