修改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,7 +141,8 @@ 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(),
//Uptime: uint64(time.Since(cachedBootTime).Seconds()),
Load1: loadStat.Load1, Load1: loadStat.Load1,
Load5: loadStat.Load5, Load5: loadStat.Load5,
Load15: loadStat.Load15, Load15: loadStat.Load15,

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"`