I'm having difficulty with this method: getMultiProcCpu (My goal is to get the count of the total number of processes running. According to the docs, it looks like that can be achieved thusly:
try {
MultiProcCpu cpu = sigar.getMultiProcCpu(query);
System.out.println("Number of processes: " + cpu.getProcesses());
} catch(SigarException se){
System.out.println(se);
}
According to the javadocs, "query" is a java.lang.String. Fair enough, but I don't know how to format it. (I'd like to format it so that I get the total number of processes running).
Jeff
try {
MultiProcCpu cpu = sigar.getMultiProcCpu(query);
System.out.println("Number of processes: " + cpu.getProcesses());
} catch(SigarException se){
System.out.println(se);
}
According to the javadocs, "query" is a java.lang.String. Fair enough, but I don't know how to format it. (I'd like to format it so that I get the total number of processes running).
Jeff