1、增加 cpu性能信息是否显示cpu每一核的开关
This commit is contained in:
@@ -141,6 +141,11 @@ public class Contants {
|
||||
*/
|
||||
public static final int STARTUP_SLEEP_SECOND;
|
||||
|
||||
/**
|
||||
* 是否CPU監測信息性能描述顯示詳細每一核的信息
|
||||
*/
|
||||
public static final boolean DESC_CPU_DETAIL;
|
||||
|
||||
static{
|
||||
SYSTEM_PATH = SysConfig.getSystemDir();
|
||||
|
||||
@@ -253,8 +258,11 @@ public class Contants {
|
||||
* 启动时最大 暂停时间,为了缓解一次启动多个nc ,dc无法处理的情况
|
||||
* 单位:s
|
||||
*/
|
||||
STARTUP_SLEEP_SECOND = SysConfig.getIntegerVal("startup.sleep.second", "10");
|
||||
|
||||
STARTUP_SLEEP_SECOND = SysConfig.getIntegerVal("startup.sleep.second", "60");
|
||||
/**
|
||||
* 1:cpu desc info contain each cpu core,0:no contain
|
||||
*/
|
||||
DESC_CPU_DETAIL = (SysConfig.getIntegerVal("desc.cpu.detail", "0")==1);
|
||||
// 初始化创建文件夹
|
||||
if(!new File(localDetecConfPath).exists()){
|
||||
new File(localDetecConfPath).mkdirs();
|
||||
|
||||
@@ -121,8 +121,10 @@ public class SystemInfo
|
||||
sb.append(cpuInfos[i].getMhz());// 主频
|
||||
detectInfo.getDetailDatas().add(sb.toString().replace("%", ""));
|
||||
// sb2.append(Contants.DETEC_STATE_INFO_FORMATE_POINT+"cpu" + i + " 主频" + cpuInfos[i].getMhz() + "MHz,使用率 "
|
||||
sb2.append(Contants.DETEC_STATE_INFO_FORMATE_POINT+"cpu" + i + " i18n_client.SystemInfo.mhz_n81i" + cpuInfos[i].getMhz() + "MHz,i18n_client.SystemInfo.shiyonglv_n81i "
|
||||
+ CpuPerc.format(cpuList[i].getCombined()) + "; ");
|
||||
if(Contants.DESC_CPU_DETAIL) {
|
||||
sb2.append(Contants.DETEC_STATE_INFO_FORMATE_POINT+"cpu" + i + " i18n_client.SystemInfo.mhz_n81i" + cpuInfos[i].getMhz() + "MHz,i18n_client.SystemInfo.shiyonglv_n81i "
|
||||
+ CpuPerc.format(cpuList[i].getCombined()) + "; ");
|
||||
}
|
||||
|
||||
// CPU总体信息情况
|
||||
userCpuPerc += cpuList[i].getUser();// 用户使用率累加
|
||||
|
||||
Reference in New Issue
Block a user