fix: NEZ-2200 talon oshi 接口更新
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user