Originally posted by Michael Grundvig:
I've actually taken a look at JMX and it didn't seem to provide any of the data I needed either. Am I missing it and it's burried in there somewhere? Thanks!
Mike
JMX is merely a management infrastructure, it enables what you need, but ...
Anyway, the JMX container in the Java 5 JVM has stuff similar, but is designed to report at a JVM level. It will report the memory usage for the JVM -- not the whole machine. It will report the
thread usage for the JVM -- not the whole machine.
This is probably true of the
Tomcat, Weblogic, Websphere,
JBoss, etc. JMX containers. At least, I never came across a particular MBean that reports at that the hardware level -- it was always reporting at the level for the application. (which is why we had to write them ourselves)
Anyway, to answer your question, it is probably best to use Runtime.exec() to the OS, and parse the data that you need. For Unix, you can use "ps", "vmstat", or the "/proc" filesystem. For Windows, you can use "typeperf".
Henry
[ January 29, 2006: Message edited by: Henry Wong ]