调整依赖
This commit is contained in:
parent
9da44bb452
commit
0ba9e2292d
@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.cm.central.control.client.socket.config.properties.SocketClientProperties;
|
||||
import com.cm.central.control.client.socket.service.socket.BaseSocketService;
|
||||
import com.cm.common.utils.DateUtil;
|
||||
import com.cm.socket.enums.SocketMessageEnum;
|
||||
import com.cm.socket.enums.SocketTypeMessageEnum;
|
||||
import com.cm.socket.pojo.Message;
|
||||
import com.sun.management.OperatingSystemMXBean;
|
||||
@ -98,7 +97,6 @@ public class ClientInfoServiceImpl extends BaseSocketService {
|
||||
clientInfoMap.put("memory", getMemory(operatingSystemMXBean, currentTime));
|
||||
clientInfoMap.put("jvmMemory", getJVMMemory(currentTime));
|
||||
clientInfoMap.put("cpu", getCPU(systemInfo, currentTime));
|
||||
// clientInfoMap.put("netIO", listNetIO(systemInfo));
|
||||
return clientInfoMap;
|
||||
}
|
||||
|
||||
@ -233,6 +231,9 @@ public class ClientInfoServiceImpl extends BaseSocketService {
|
||||
HardwareAbstractionLayer hardwareAbstractionLayer = systemInfo.getHardware();
|
||||
List<Map<String, Object>> netIOList = new ArrayList<>();
|
||||
for (NetworkIF net : hardwareAbstractionLayer.getNetworkIFs()) {
|
||||
if(net.getIPv4addr() == null || net.getIPv4addr().length == 0) {
|
||||
continue;
|
||||
}
|
||||
Map<String, Object> netIOMap = getHashMap(10);
|
||||
netIOMap.put("name", net.getName());
|
||||
netIOMap.put("displayName", net.getDisplayName());
|
||||
|
Loading…
Reference in New Issue
Block a user