c9s / Goprocinfo
Licence: mit
Linux /proc info parser for Go
Stars: ✭ 610
Programming Languages
go
31211 projects - #10 most used programming language
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.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].