-
1. Re: jboss 7.1.1 - Write DB connection pool usage, active sessions count, JVM memory usage to a log file
wdfink Jul 7, 2016 4:08 AM (in response to syau)At the same time, in JBoss management console, I could see under 'Pool Usage' tab, 'Active Count' and 'Max Used' - Is this
the correct representation of pool usage?
Yes, Max Used is the peak number of connections used concurrent.
AFAIR you need to enable the jca pool connection logging to see whether connections are handed out or returned to pool, not sure whether it shows the current usage.
But you can invoke CLI to show the pool usage periodical.
For memory usage I would use the GC logfile, enable it by set the options to standalone.conf (i.e. -verbose:gc) you need to check the parameters for your JVM
-
2. Re: jboss 7.1.1 - Write DB connection pool usage, active sessions count, JVM memory usage to a log file
syau Jul 9, 2016 10:54 PM (in response to wdfink)I managed to write gc details into a log file. I added that in the services.bat. Can you please let me know, how I could get that 'Max Used' / 'Active Count' and 'activeSessions' values into a file? Do I have to write a standalone script or Java program to do that? Or Is it possible to include it in the services.bat, just like gc log? If you could provide some samples that will be useful. Thanks.
-
3. Re: jboss 7.1.1 - Write DB connection pool usage, active sessions count, JVM memory usage to a log file
wdfink Jul 11, 2016 8:21 AM (in response to syau)you can use the bin/jboss-cli.sh script and call it from a shell script or cron job periodically.
The command is
bin/jboss-cli.sh -c "/subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(include-runtime="true", recursive=true)"
also you are able to read a specific attribute using ":read-attribute(name=ActiveCount)"
You can redirect this to a file like each Unix command