修改bug

This commit is contained in:
wangjian 2023-03-24 08:51:04 +08:00
parent e857790db1
commit 001bf671e9
2 changed files with 9 additions and 8 deletions

View File

@ -141,13 +141,14 @@ func GetState(nodeName string) *model.NodeState {
NetOutTransfer: netOutTransfer, NetOutTransfer: netOutTransfer,
NetInSpeed: netInSpeed, NetInSpeed: netInSpeed,
NetOutSpeed: netOutSpeed, NetOutSpeed: netOutSpeed,
Uptime: uint64(time.Since(cachedBootTime).Seconds()), Uptime: time.Now().Unix(),
Load1: loadStat.Load1, //Uptime: uint64(time.Since(cachedBootTime).Seconds()),
Load5: loadStat.Load5, Load1: loadStat.Load1,
Load15: loadStat.Load15, Load5: loadStat.Load5,
TcpConnCount: tcpConnCount, Load15: loadStat.Load15,
UdpConnCount: udpConnCount, TcpConnCount: tcpConnCount,
ProcessCount: uint64(len(procs)), UdpConnCount: udpConnCount,
ProcessCount: uint64(len(procs)),
} }
} }

View File

@ -38,7 +38,7 @@ type NodeState struct {
NetOutTransfer uint64 `json:"netOutTransfer,omitempty"` NetOutTransfer uint64 `json:"netOutTransfer,omitempty"`
NetInSpeed uint64 `json:"netInSpeed,omitempty"` NetInSpeed uint64 `json:"netInSpeed,omitempty"`
NetOutSpeed uint64 `json:"netOutSpeed,omitempty"` NetOutSpeed uint64 `json:"netOutSpeed,omitempty"`
Uptime uint64 `json:"uptime,omitempty"` Uptime int64 `json:"uptime,omitempty"`
Load1 float64 `json:"load1,omitempty"` Load1 float64 `json:"load1,omitempty"`
Load5 float64 `json:"load5,omitempty"` Load5 float64 `json:"load5,omitempty"`
Load15 float64 `json:"load15,omitempty"` Load15 float64 `json:"load15,omitempty"`