mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
optimize: 优化自动更新相关代码
This commit is contained in:
@@ -37,6 +37,7 @@ var (
|
||||
cachedBootTime time.Time
|
||||
)
|
||||
|
||||
// GetHost 获取主机硬件信息
|
||||
func GetHost(agentConfig *model.AgentConfig) *model.Host {
|
||||
hi, _ := host.Info()
|
||||
var cpuType string
|
||||
@@ -155,6 +156,7 @@ func GetState(agentConfig *model.AgentConfig, skipConnectionCount bool, skipProc
|
||||
}
|
||||
}
|
||||
|
||||
// TrackNetworkSpeed NIC监控,统计流量与速度
|
||||
func TrackNetworkSpeed(agentConfig *model.AgentConfig) {
|
||||
var innerNetInTransfer, innerNetOutTransfer uint64
|
||||
nc, err := net.IOCounters(true)
|
||||
|
||||
Reference in New Issue
Block a user