修改bug
This commit is contained in:
		
							parent
							
								
									e857790db1
								
							
						
					
					
						commit
						001bf671e9
					
				|  | @ -141,13 +141,14 @@ func GetState(nodeName string) *model.NodeState { | |||
| 		NetOutTransfer: netOutTransfer, | ||||
| 		NetInSpeed:     netInSpeed, | ||||
| 		NetOutSpeed:    netOutSpeed, | ||||
| 		Uptime:         uint64(time.Since(cachedBootTime).Seconds()), | ||||
| 		Load1:          loadStat.Load1, | ||||
| 		Load5:          loadStat.Load5, | ||||
| 		Load15:         loadStat.Load15, | ||||
| 		TcpConnCount:   tcpConnCount, | ||||
| 		UdpConnCount:   udpConnCount, | ||||
| 		ProcessCount:   uint64(len(procs)), | ||||
| 		Uptime:         time.Now().Unix(), | ||||
| 		//Uptime:         uint64(time.Since(cachedBootTime).Seconds()),
 | ||||
| 		Load1:        loadStat.Load1, | ||||
| 		Load5:        loadStat.Load5, | ||||
| 		Load15:       loadStat.Load15, | ||||
| 		TcpConnCount: tcpConnCount, | ||||
| 		UdpConnCount: udpConnCount, | ||||
| 		ProcessCount: uint64(len(procs)), | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ type NodeState struct { | |||
| 	NetOutTransfer uint64  `json:"netOutTransfer,omitempty"` | ||||
| 	NetInSpeed     uint64  `json:"netInSpeed,omitempty"` | ||||
| 	NetOutSpeed    uint64  `json:"netOutSpeed,omitempty"` | ||||
| 	Uptime         uint64  `json:"uptime,omitempty"` | ||||
| 	Uptime         int64   `json:"uptime,omitempty"` | ||||
| 	Load1          float64 `json:"load1,omitempty"` | ||||
| 	Load5          float64 `json:"load5,omitempty"` | ||||
| 	Load15         float64 `json:"load15,omitempty"` | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue