Skip to content
forked from c9s/goprocinfo

Linux /proc info parser for Go With fix for older kernels

Notifications You must be signed in to change notification settings

nlacey/goprocinfo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 

Repository files navigation

goprocinfo

/proc information parser for Go, includes a fix for older kernels

Usage

import linuxproc "github.com/nlacey/goprocinfo/linux"

stat, err := linuxproc.ReadStat("/proc/stat")
if err != nil {
    t.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

Reference

About

Linux /proc info parser for Go With fix for older kernels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%