mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-14 01:27:49 +08:00
暂时关闭统计功能
This commit is contained in:
parent
ec45deda5e
commit
519ccccd7b
@ -20,22 +20,22 @@ public class SystemInfoTimerTask {
|
||||
@Autowired
|
||||
private IRedisCatchStorage redisCatchStorage;
|
||||
|
||||
@Scheduled(fixedRate = 2000) //每1秒执行一次
|
||||
public void execute(){
|
||||
try {
|
||||
double cpuInfo = SystemInfoUtils.getCpuInfo();
|
||||
redisCatchStorage.addCpuInfo(cpuInfo);
|
||||
double memInfo = SystemInfoUtils.getMemInfo();
|
||||
redisCatchStorage.addMemInfo(memInfo);
|
||||
Map<String, Double> networkInterfaces = SystemInfoUtils.getNetworkInterfaces();
|
||||
redisCatchStorage.addNetInfo(networkInterfaces);
|
||||
List<Map<String, Object>> diskInfo =SystemInfoUtils.getDiskInfo();
|
||||
redisCatchStorage.addDiskInfo(diskInfo);
|
||||
} catch (InterruptedException e) {
|
||||
log.error("[获取系统信息失败] {}", e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
// @Scheduled(fixedRate = 2000) //每1秒执行一次
|
||||
// public void execute(){
|
||||
// try {
|
||||
// double cpuInfo = SystemInfoUtils.getCpuInfo();
|
||||
// redisCatchStorage.addCpuInfo(cpuInfo);
|
||||
// double memInfo = SystemInfoUtils.getMemInfo();
|
||||
// redisCatchStorage.addMemInfo(memInfo);
|
||||
// Map<String, Double> networkInterfaces = SystemInfoUtils.getNetworkInterfaces();
|
||||
// redisCatchStorage.addNetInfo(networkInterfaces);
|
||||
// List<Map<String, Object>> diskInfo =SystemInfoUtils.getDiskInfo();
|
||||
// redisCatchStorage.addDiskInfo(diskInfo);
|
||||
// } catch (InterruptedException e) {
|
||||
// log.error("[获取系统信息失败] {}", e.getMessage());
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user