1 Star 0 Fork 1

橙子/gopsutil

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
load.go 632 Bytes
一键复制 编辑 原始数据 按行查看 历史
package load
import (
"encoding/json"
"github.com/shirou/gopsutil/internal/common"
)
var invoke common.Invoker = common.Invoke{}
type AvgStat struct {
Load1 float64 `json:"load1"`
Load5 float64 `json:"load5"`
Load15 float64 `json:"load15"`
}
func (l AvgStat) String() string {
s, _ := json.Marshal(l)
return string(s)
}
type MiscStat struct {
ProcsTotal int `json:"procsTotal"`
ProcsCreated int `json:"procsCreated"`
ProcsRunning int `json:"procsRunning"`
ProcsBlocked int `json:"procsBlocked"`
Ctxt int `json:"ctxt"`
}
func (m MiscStat) String() string {
s, _ := json.Marshal(m)
return string(s)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xuchengzhi/gopsutil.git
git@gitee.com:xuchengzhi/gopsutil.git
xuchengzhi
gopsutil
gopsutil
v3.21.7

搜索帮助