}
public static void getServerCpuInfo(Sigar sigar, ServerStatus status) {
try {
CpuInfo infos[] = sigar.getCpuInfoList();
CpuPerc cpuList[] = sigar.getCpuPercList();
double totalUse = 0L;
for (int i = 0; i < infos.length; i++) {
CpuPerc perc = cpuList[i];
CpuInfoVo cpuInfo = new CpuInfoVo();
cpuInfo.setId(infos[i].hashCode() + "");
cpuInfo.setCacheSize(infos[i].getCacheSize());
cpuInfo.setModel(infos[i].getModel());
cpuInfo.setUsed(CpuPerc.format(perc.getCombined()));
cpuInfo.setUsedOrigVal(perc.getCombined());
cpuInfo.setIdle(CpuPerc.format(perc.getIdle()));
cpuInfo.setTotalMHz(infos[i].getMhz());
cpuInfo.setVendor(infos[i].getVendor());
status.getCpuInfos().add(cpuInfo);
totalUse += perc.getCombined();
}
String cpuu = CpuPerc.format(totalUse / status.getCpuInfos().size());
cpuu = cpuu.substring(0,cpuu.length()-1);
status.setCpuUsage(cpuu);
} catch (Exception e) {