module

Sysinfo

Constants

RTLD_NOW = 2

dlfcn.h RTLD_NOW: resolve everything now, fail fast

Class methods

amd_device_dirs(base = "/sys") : Array(String)

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.

Source
amd_gpu(dir : String) : Gpu

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

Source
cpu_percentages

Busy percent per core since the previous refresh_cpu (empty until refresh_cpu ran; zeros after only one call).

Source
dynamic_symbol(handle : Pointer(Void), name : String) : Pointer(Void) | Nil
Source
gpus

The last refresh_gpus snapshot (empty until it ran, on platforms without a backend, or with no supported card).

Source
hwmon_sensors(base = "/sys") : Array(Sensor)

The hwmon sensor list; base is overridable for the specs.

Source
memory

Global RAM, nil = unknown on this platform.

Source
network

The last network sample (nil until refresh_network ran, or on platforms without a backend).

Source
nvml_gpus

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

Source
open_dynamic_library(names : Enumerable(String)) : Pointer(Void) | Nil
Source
platform_cpu_ticks

Per-core (busy, idle) jiffy counters from /proc/stat ("cpuN: user nice system idle iowait irq softirq steal ...").

Source
platform_gpus

GPU readings: the NVIDIA cards through NVML, the Intel GPUs through Level Zero Sysman, plus every amdgpu card in KFD order.

Source
platform_memory
Source
platform_network_counters

(received, sent) byte counters from /proc/net/dev, skipping lo.

Source
platform_refresh_processes
Source
platform_sensors

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.

Source
process_tree_memory_kb(root_pid : Int32 | Nil) : Int64

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.

Source
processes

The last snapshot (empty until refresh_processes ran).

Source
refresh_cpu

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

Source
refresh_gpus

Read every supported GPU's current readings and swap the snapshot.

Source
refresh_network

Sample interface counters and update traffic rates. Like CPU, the first call only stores a baseline. Loopback is excluded.

Source
refresh_processes

Rebuild the process snapshot (call off the UI hot path — reading a few hundred entries takes milliseconds).

Source
refresh_sensors

Read every supported temperature sensor and swap the snapshot.

Source
sensors

The last refresh_sensors snapshot (empty until it ran, on platforms without a backend, or with no sensors).

Source
zes_gpus

The Intel GPUs' readings; initialized once like the NVML reader, and absent Level Zero reports nothing (machines without the runtime, or macOS).

Source

Nested types