I have a jboss-4.2.3.GA installation where I suspect the thread pool may be incrising over time due to threads not being properly released. I am not getting any messages when maxthreads is reached, So I would like to log the number of threads in use to a file every five minutes so I can verify this hypothesis. Would anyone please be able to advise how this can be be done?
You can use JMX to get the thread count from java. with the addon jmx4perl you can do JMX calls from a very basic perl script. There is also an addon for Nagios to integrate with j4p for alerting and monitoring of various parameters.
http://blog.techstacks.com/2009/09/tomcat-management-jmx4perl-makes-it-easier.html has a few good examples.
I know this is an old question, but someone might find this interesting. I had a similar problem where I wanted the monitor the jboss connection pools toward the database. What I did was to create a small shell script that each second minute used
I ended up using something like this in my
In your case you need to alter the