goprocinfo

Linux /proc info parser for Go

  • Owner: c9s/goprocinfo
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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.

Main metrics

Overview
Name With Ownerc9s/goprocinfo
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2013-11-17 09:48:21
Pushed At2021-01-30 14:39:24
Last Commit At2021-01-30 22:39:23
Release Count0
用户参与
Stargazers Count784
Watchers Count25
Fork Count102
Commits Count146
Has Issues Enabled
Issues Count13
Issue Open Count5
Pull Requests Count38
Pull Requests Open Count0
Pull Requests Close Count2
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private