I am new to this field of calculating CPU and memory usage using JMX and MXBeans
. I just wanted to know what exactly JMX is and what is the difference between MXBeans
and JMX? Is there anything called OSBeans also?
Asked
Active
Viewed 423 times
0
-
You might wanna take a look at this answer http://stackoverflow.com/questions/9232132/use-of-jmx-and-how-to-use-for-existing-applications – Christian Grabowski Apr 06 '16 at 13:46
1 Answers
2
JMX is the acronym for Java Management Extensions. It's the technology provided by Java that supplies tools for managing and monitoring applications, system objects and others like devices, etc...
Before asking for a MXBean, you should know about MBeans. An MBean
is basically a managed Java object, accessible through JMX.
An MXBean
is a type of MBean that references only a predefined set of data types.
You can find more information in the Java MBean Tutorial.
According to OSBeans, as far as I know there's nothing about it in java. Maybe you mean OperatingSystemMXBean
(OperatingSystemMXBean) which is a platform-specific management interface for the operating system on which the Java virtual machine is running.
-
yeah i mean OperatingSystemMXBean. how to calculate cpu and memory usage parameters using OperatingSystemMXBean and MXBean – FAZ Apr 06 '16 at 12:07
-
1@FAZ That's another question. Maybe this helps you to access those beans. http://stackoverflow.com/questions/36155751/how-to-figure-out-the-cpu-usage-of-a-java-process-in-java/36156470#36156470 – RubioRic Apr 06 '16 at 12:10
-
1Check this as well http://stackoverflow.com/questions/18489273/how-to-get-percentage-of-cpu-usage-of-os-from-java – Jorge Apr 06 '16 at 12:10