# `Sys.Linux.Proc.Stat`
[🔗](https://github.com/harmont-dev/hyper/blob/main/lib/sys/linux/proc/stat.ex#L1)

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`).

# `parse`

```elixir
@spec parse(String.t()) :: Sys.Linux.Proc.Stat.Snapshot.t()
```

Parse a `/proc/stat` payload.

# `read`

```elixir
@spec read() :: {:ok, Sys.Linux.Proc.Stat.Snapshot.t()} | {:error, File.posix()}
```

Read and parse `/proc/stat`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
