Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Linux /proc info parser for Go
Go
branch: master

Merge pull request #27 from november-eleven/feat-loadavg

Add ProcessRunning and ProcessTotal to LoadAvg
latest commit 14038397a1
@c9s authored

README.md

goprocinfo

/proc information parser for Go.

Usage

import linuxproc "github.com/c9s/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

License

goprocinfo is distributed under the MIT license.

Something went wrong with that request. Please try again.