暂时关闭统计功能

This commit is contained in:
lin 2026-01-21 22:52:57 +08:00
parent ec45deda5e
commit 519ccccd7b

View File

@ -20,22 +20,22 @@ public class SystemInfoTimerTask {
@Autowired @Autowired
private IRedisCatchStorage redisCatchStorage; private IRedisCatchStorage redisCatchStorage;
@Scheduled(fixedRate = 2000) //每1秒执行一次 // @Scheduled(fixedRate = 2000) //每1秒执行一次
public void execute(){ // public void execute(){
try { // try {
double cpuInfo = SystemInfoUtils.getCpuInfo(); // double cpuInfo = SystemInfoUtils.getCpuInfo();
redisCatchStorage.addCpuInfo(cpuInfo); // redisCatchStorage.addCpuInfo(cpuInfo);
double memInfo = SystemInfoUtils.getMemInfo(); // double memInfo = SystemInfoUtils.getMemInfo();
redisCatchStorage.addMemInfo(memInfo); // redisCatchStorage.addMemInfo(memInfo);
Map<String, Double> networkInterfaces = SystemInfoUtils.getNetworkInterfaces(); // Map<String, Double> networkInterfaces = SystemInfoUtils.getNetworkInterfaces();
redisCatchStorage.addNetInfo(networkInterfaces); // redisCatchStorage.addNetInfo(networkInterfaces);
List<Map<String, Object>> diskInfo =SystemInfoUtils.getDiskInfo(); // List<Map<String, Object>> diskInfo =SystemInfoUtils.getDiskInfo();
redisCatchStorage.addDiskInfo(diskInfo); // redisCatchStorage.addDiskInfo(diskInfo);
} catch (InterruptedException e) { // } catch (InterruptedException e) {
log.error("[获取系统信息失败] {}", e.getMessage()); // log.error("[获取系统信息失败] {}", e.getMessage());
} // }
//
} // }
} }