- Notifications
You must be signed in to change notification settings - Fork102
Linux /proc info parser for Go
License
NotificationsYou must be signed in to change notification settings
c9s/goprocinfo
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
/proc information parser for Go.
import ("log"linuxproc"github.com/c9s/goprocinfo/linux")stat,err:=linuxproc.ReadStat("/proc/stat")iferr!=nil {log.Fatal("stat read fail")}for_,s:=rangestat.CPUStats {// s.User// s.Nice// s.System// s.Idle// s.IOWait}// stat.CPUStatAll// stat.CPUStats// stat.Processes// stat.BootTime// ... etc
Full documentation is available atGodoc.
goprocinfo is distributed under the MIT license.