fix: NEZ-2200 talon oshi 接口更新

This commit is contained in:
zhangshuai
2022-09-14 09:53:36 +08:00
parent 4eddf0e0dc
commit e70e687298

View File

@@ -163,6 +163,7 @@ public class OSHIUtils {
procsData.put("path",proc.getPath());
procsData.put("virtualSize",proc.getVirtualSize());
procsData.put("residentSetSize",proc.getResidentSetSize());
procsData.put("runTime",proc.getUpTime());
result.add(procsData);
}
@@ -210,9 +211,11 @@ public class OSHIUtils {
//未知进程 getowningProcessId 返回 -1 为避免获取进程name error
map.put("processId","unknown");
map.put("processName","unknown");
map.put("processCmd","unknown");
}else {
map.put("processId",connection.getowningProcessId());
map.put("processName",operatingSystem.getProcess(connection.getowningProcessId()).getName());
map.put("processCmd",operatingSystem.getProcess(connection.getowningProcessId()).getCommandLine());
}
result.add(map);