package main import ( "cicv-data-closedloop/common/util" "fmt" ) //type DeviceMonitor struct { // Id int `db:"id" json:"id"` // 自增id // TotalCpuUsage string `db:"total_cpu_usage" json:"totalCpuUsage"` // cpu总占用 // TotalMemoryUsage string `db:"total_memory_usage" json:"totalMemoryUsage"` // 内存总占用 // Top10Process string `db:"top10_process" json:"top10Process"` // cpu占用前十的进程信息 // DeviceNumber string `db:"device_number" json:"deviceNumber"` // cpu占用前十的进程信息 // SocIp string `db:"soc_ip" json:"socIp"` // cpu占用前十的进程信息 //} // 保存资源占用情况 func main() { fmt.Println(util.GetMemoryPercent()) }