I want to get the following data using java 1.8.
- CPU Usage.
- Total Physical Memory
- Available Memory
- Free Memory
I have used OperatingSystemMXBean
but it doesn't have methods to get above data.
Also I used Runtime.getRuntime()
to get memory size but it return the long value which I unable to convert into MB or GB.