Hi I am using sigar with Eclipse. I have copied junit.jar, log4j.jar, sigar.jar and sigar-x86-winnt.dll (I am on win32) in the project's path. When I execute this code:
import org.hyperic.sigar.*;
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
SysInfo si = new SysInfo();
System.out.println(si.getArch());
Cpu cpu = new Cpu();
System.out.println(cpu.getIdle());
DiskUsage du = new DiskUsage();
System.out.println(du.getReads());
}
}
I do not get any error by I get zero or null from any function, this is the output of the program:
null
0
0
Any idea why I get null/zero values?