-
1. Re: How to explore CPU via JMX
tom.elrod Mar 3, 2003 11:02 PM (in response to aditya)Since what you require is really system specific, it would have to been done via native method calls (meaning having to write C++ or some other native language). You could then take this native code and access it via Java (JNI) and wrap it in an MBean. To my knowledge, this is the only way to go.
Since this is a fairly common requirement, so you might find a project on SourceForge that already provides the code you need. If you find something like this, please post it badk to the forum for others. -
3. Re: How to explore CPU via JMX
adrian.brock Mar 19, 2003 3:21 PM (in response to aditya)This might be included in java 1.5
There are plans to monitor the jvm using jmx.
Regards,
Adrian -
4. Re: How to explore CPU via JMX
heejune Mar 22, 2003 10:24 AM (in response to aditya)Hi,
I think I first have to remind you that
JMX is just a standard for any management client applicaiton that follows this API can find and get/set/invoke an MBean (agent or the target object itself). So, if you can do anything in JAVA or even JNI,
then you can do it using JMX.
Whether you can do or not is totally dependent on if you can do the job when JMX is not involved.
Specifically, you can get free JVM memory through Runtime.getmemeory and you can shutdown using some system dependent JNI code.
BR -
5. Re: How to explore CPU via JMX
jhaynie Apr 4, 2003 12:22 AM (in response to aditya)we've developed a runtime stats mbean that will allow you to explore/send notifications about:
- CPU load
- RAM in usage
- Handle count
- Free/Available Disk Space
Requires JNI to get the values, and works on Windows and Linux currently.
I'd like to open source it and get it into JBoss distro soon... when i have some more time. -
6. Re: How to explore CPU via JMX
cassiofreire Feb 16, 2006 8:30 AM (in response to aditya)Hi All,
Somebody has another solution for this question?
Thanks in advance -
7. Re: How to explore CPU via JMX
starksm64 Feb 16, 2006 12:28 PM (in response to aditya)java.lang.management.ThreadMXBean in jdk5