Epic: More Metrics
Why
When CPU or RAM spikes, users want to know what is responsible.
Scope
Walk /proc/[pid]/stat and /proc/[pid]/status (or comm), compute per-process CPU% via deltas, and return the top-N by CPU and by RSS. Bound N and compute on the slow tick to limit cost.
Reuse & touch points
- New
internal/collector/process.go + fixtures (feed synthetic /proc/<pid> directories via testhelpers_test.go).
API & config impact
- New
GET /api/v1/processes (kept off the main snapshot to bound payload size).
- Config
processes_enabled, processes_top_n.
Acceptance criteria
- A fixture pid set produces the correct top-N ordering by CPU and by memory.
Epic: More Metrics
Why
When CPU or RAM spikes, users want to know what is responsible.
Scope
Walk
/proc/[pid]/statand/proc/[pid]/status(orcomm), compute per-process CPU% via deltas, and return the top-N by CPU and by RSS. Bound N and compute on the slow tick to limit cost.Reuse & touch points
internal/collector/process.go+ fixtures (feed synthetic/proc/<pid>directories viatesthelpers_test.go).API & config impact
GET /api/v1/processes(kept off the main snapshot to bound payload size).processes_enabled,processes_top_n.Acceptance criteria