mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-22 05:17:49 +08:00
暂时关闭统计功能
This commit is contained in:
parent
ec45deda5e
commit
519ccccd7b
@ -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());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user