Skip to content

About

Linux /proc info parser for Go

Resources

Code of conduct

Contributing

Stars

794 stars

Watchers

23 watching

Forks

Latest commit

 

History

146 Commits

Folders and files

Repository files navigation

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.

About

Linux /proc info parser for Go

Resources

Code of conduct

Contributing

Stars

794 stars

Watchers

23 watching

Forks

Releases

Packages

Used by

Contributors

Languages