首页改造,完成cpu,内存,网络图
This commit is contained in:
@@ -22,14 +22,14 @@ public class SystemInfoTimerTask {
|
||||
@Autowired
|
||||
private IRedisCatchStorage redisCatchStorage;
|
||||
|
||||
@Scheduled(fixedRate = 1000) //每1秒执行一次
|
||||
@Scheduled(fixedRate = 2000) //每1秒执行一次
|
||||
public void execute(){
|
||||
try {
|
||||
double cpuInfo = SystemInfoUtils.getCpuInfo();
|
||||
redisCatchStorage.addCpuInfo(cpuInfo);
|
||||
double memInfo = SystemInfoUtils.getMemInfo();
|
||||
redisCatchStorage.addMemInfo(memInfo);
|
||||
Map<String, String> networkInterfaces = SystemInfoUtils.getNetworkInterfaces();
|
||||
Map<String, Double> networkInterfaces = SystemInfoUtils.getNetworkInterfaces();
|
||||
redisCatchStorage.addNetInfo(networkInterfaces);
|
||||
} catch (InterruptedException e) {
|
||||
logger.error("[获取系统信息失败] {}", e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user