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.
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