-
Notifications
You must be signed in to change notification settings - Fork 84
Home
JavaSysMon is designed to provide an OS-independent way to get live system information such as CPU and memory usage, distributed as a single jar file. It is written in C and Java. However the C is hidden away inside the jar (thanks to one-jar), so you never need to worry about it.
Currently it supports Mac OS X (PowerPC, Intel 32 bit and Intel 64 bit). Support for Windows and Linux will be added shortly; Solaris should follow a little later. Ultimately we aim to support everything from AIX to Android.
Run ant, and then:
java -jar target/javasysmon.jar
Simply put the jar in your classpath, and use it like this:
import com.jezhumble.javasysmon.JavaSysMon;
JavaSysMon monitor = new JavaSysMon();
float cpuUsage = monitor.cpuUsage();
long totalMemory = monitor.totalMemory();
long freeMemory = monitor.freeMemory();
- Currently only supports Mac OS X (PowerPC, Intel 32 bit and Intel 64 bit)
- Supports Java 1.4 and above
JavaSysMon is BSD licensed.