Tomcat memory information

i wrote a little test programm which queries the status servlet of a tomcat an fetches the memory information of the jvm (free,total,max). Is there a way to get more information ? Like CPU, memory of the process, system memory and so on. I know that some of these things may possible to get somehow because there are tools (e.g. probe) which can fetch more information. What i want to achieve is to build maybe an ant task which i can call(is there maybe an better approach or already something ready to use?), which log's as much information for the time being. Any information/help would be appreceated. Thanks.



You can pull out a great deal using JMX , Tomcat has some docs on how to enable JMX, and also ant tasks for querying the management beans.

Try hook up jconsole to Tomcat after you've enabled JMX, you can browse all the management information available from a GUI.

You can't do it with only the base libraries, but you can get all you want and more with the SIGAR API. Some examples of things you can get:

  • System memory, swap, cpu, load average, uptime, logins
  • Per-process memory, cpu, credential info, state, arguments, environment, open files
  • File system detection and metrics
  • Network interface detection, configuration info and metrics
  • TCP and UDP connection tables
  • Network routing tables

Need Your Help

How does Python run module code when there's no matching .pyc file?

python bytecode

If I import a from the python command line in windows 7 I see the corresponding module1.pyc file appear in the Python32/pycache/ folder. My understanding was that it is this bytecode wh...

How to group filtered rows against non filtered by month

sql sql-server sql-server-2008-r2

I am trying to generate a report for accepted orders each month against the total orders for that month. For example, I have a table Orders like so: