module
Version:
v0.0.0-...-c95fcf8
Opens a new window with list of versions in this module.
Published: Jan 30, 2021
License: MIT
Opens a new window with license information.
README
¶
goprocinfo
/proc information parser for Go.
Usage
import (
"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
Documentation
Full documentation is available at Godoc.
Reference
License
goprocinfo is distributed under the MIT license.
Directories
¶
Click to show internal directories.
Click to hide internal directories.