Read system, kernel and process metrics from /proc and /sys in Go
open sourceApache-2.0free
procfs is a Go library from the Prometheus project that reads system, kernel and process metrics from the /proc and /sys pseudo-filesystems. Its packages are organised by where the data comes from and what it is: process information is in the root package, and sub-packages such as blockdevice cover device statistics. Each package has an FS type for the mount point to read from.
Problems it solves
- read CPU and process statistics from /proc in my Go program without parsing the files myself
- collect disk and block device metrics on Linux from Go
- build a metrics exporter that reports what the kernel exposes in /proc and /sys
Features
- CPU, kernel and process statistics from /proc
- block device and other statistics from /sys
- FS type per package for the mount points to read
Limitations
- A work in progress: its API may still change in backwards-incompatible ways without warning.1
