Help us shape the future of Go! Take the 2026 Go Developer Survey

goprocinfo

module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2019 License: MIT

README

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL