在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):c9s/goprocinfo开源软件地址(OpenSource Url):https://github.com/c9s/goprocinfo开源编程语言(OpenSource Language):Go 100.0%开源软件介绍(OpenSource Introduction):goprocinfo/proc information parser for Go. Usageimport (
"log"
linuxproc "github.com/c9s/goprocinfo/linux"
)
stat, err := linuxproc.ReadStat("/proc/stat")
if err != nil {
log.Fatal("stat read fail")
}
for _, s := range stat.CPUStats {
// s.User
// s.Nice
// s.System
// s.Idle
// s.IOWait
}
// stat.CPUStatAll
// stat.CPUStats
// stat.Processes
// stat.BootTime
// ... etc DocumentationFull documentation is available at Godoc. ReferenceLicensegoprocinfo is distributed under the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论