Sysinfo
Constants
dlfcn.h RTLD_NOW: resolve everything now, fail fast
Class methods
The amdgpu sysfs device folders (/sys/class/drm/renderD<N>/device)
of the AMD GPUs, in KFD topology order — the numbering HIP and
Strata's telemetry use. GPU nodes are the KFD nodes with a gfx
target version and SIMDs; each is linked to its render node by
drm_render_minor. base is overridable for the specs.
One amdgpu card's readings: load (gpu_busy_percent), VRAM (mem_info_vram_used/_total, bytes) and, from its hwmon folder, the edge temperature (temp1_input, m°C), power (power1_average or power1_input, µW) and its cap (power1_cap).
Busy percent per core since the previous refresh_cpu (empty until refresh_cpu ran; zeros after only one call).
The last refresh_gpus snapshot (empty until it ran, on platforms without a backend, or with no supported card).
The hwmon sensor list; base is overridable for the specs.
The last network sample (nil until refresh_network ran, or on platforms without a backend).
The NVIDIA cards' readings; the NVML reader is initialized once (a failed load is cached too, so machines without an NVIDIA driver do not retry dlopen on every refresh).
Per-core (busy, idle) jiffy counters from /proc/stat ("cpuN: user nice system idle iowait irq softirq steal ...").
GPU readings: the NVIDIA cards through NVML, the Intel GPUs through Level Zero Sysman, plus every amdgpu card in KFD order.
Temperature sensors: every hwmon chip under /sys/class/hwmon,
each of its temp<N>_inputs with its label and max/critical
limits — the same tree the sensors tool reads.
Resident memory of a process and all its descendants in KB — the closest thing to "what this tab actually uses", since shells spawn children (compilers, servers, agents). 0 when unknown / without a snapshot. Cycle-safe.
Sample CPU counters and update per-core percentages. The first call only stores a baseline, so percentages read 0 until the second call (space the calls ~1 s apart for readable rates).
Sample interface counters and update traffic rates. Like CPU, the first call only stores a baseline. Loopback is excluded.
Rebuild the process snapshot (call off the UI hot path — reading a few hundred entries takes milliseconds).
The last refresh_sensors snapshot (empty until it ran, on platforms without a backend, or with no sensors).
The Intel GPUs' readings; initialized once like the NVML reader, and absent Level Zero reports nothing (machines without the runtime, or macOS).