Let me introduce you to an open source tool SIGAR
Official website: http://sigar.hyperic.com/
Api:http://www.hyperic.com/support/docs/sigar/index-all.html (because it is English, English is not good can use Google browser translation function, directly converted to Simplified Chinese to read)
SIGAR (System Information Gatherer and Reporter) is an open-source tool that provides a Cross-platform system Information collection API, implemented by the C language. The information that can be collected includes:
1 CPU information, including basic information (vendor, model, MHz, cacheSize), and statistics (user, sys, idle, nice, wait)
2 File system information, including filesystem, Size, Used, avail, use%, Type
3 event information, similar to service control Manager
4 Memory information, total number of physical memory and swap memory, usage, remaining number, RAM size
5 Network information, including network interface information and network routing information
6 process information, including memory per process, CPU usage, status, parameters, handle
7 IO information, including IO status, read-write size, etc.
8 Service status information
9 System information, including operating system version, System resource constraints, system running time and load, Java version information, etc.
First we have to download the SIGAR package, I downloaded the package named: hyperic-sigar-1.6.4
We are in the process of running, first we have to do the preparatory work
1. Copy Log4.jar, Sigar.jar package to Lib (if we only do this step, start running the program then the following conditions will appear [under Windows operating system])
Workaround:
Copy Sigar-x86-winnt.dll This file to the Java JDK's Bin directory
The above is a small series for everyone to bring Java use SIGAR encountered problems of the rapid solution to all the content, I hope that we support cloud Habitat Community ~