0

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?

Cœur
  • 37,241
  • 25
  • 195
  • 267
FAZ
  • 255
  • 1
  • 3
  • 13

1 Answers1

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.

Nic
  • 6,211
  • 10
  • 46
  • 69
Jorge
  • 1,136
  • 9
  • 15
  • 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
  • 1
    Check 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