Reads kernel counters from /proc/stat.
Captures the aggregate cpu line, the per-core cpuN lines, and the scalar
counters (ctxt, btime, processes, procs_running, procs_blocked). The
intr and softirq lines are intentionally skipped: their bodies are long,
hardware-specific per-source vectors that carry no portable meaning.
CPU figures are cumulative jiffies since boot, so a single read is meaningless on
its own; utilization is a busy fraction the caller derives from the delta between
two snapshots (see Sys.Mon.Cpu).
Summary
Functions
@spec parse(String.t()) :: Sys.Linux.Proc.Stat.Snapshot.t()
Parse a /proc/stat payload.
@spec read() :: {:ok, Sys.Linux.Proc.Stat.Snapshot.t()} | {:error, File.posix()}
Read and parse /proc/stat.