Quantcast
Channel: VMware Communities : Popular Discussions - Hyperic User Forums
Viewing all articles
Browse latest Browse all 52618

getMultiProcCpu

$
0
0
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

Viewing all articles
Browse latest Browse all 52618

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>