Skip to main content

Module sys

Module sys 

Source
Expand description

Platform-specific system information: CPU, memory, load averages.

Modules§

inner 🔒

Structs§

CpuTicks
CPU tick snapshot used to derive usage across a sampling interval.
OsProfile
Snapshot of the host machine’s hardware and OS environment.

Constants§

LOAD_AVG_COUNT 🔒

Functions§

cpu_model
CPU model string from /proc/cpuinfo.
cpu_usage_from_ticks
Compute CPU usage percentage from two tick snapshots.
efficiency_cores
Efficiency core count (E-cores on Apple Silicon, 0 on x86).
logical_cores
Total number of logical CPU cores.
optimal_concurrency
Optimal core count for compute work: P-cores on Apple Silicon, physical on x86.
os_profile
Capture a snapshot of the current host machine profile.
performance_cores
Performance core count (P-cores on Apple Silicon, physical on x86).
physical_cores
Physical CPU core count (best-effort, falls back to logical).
read_cpu_ticks
Read a CPU tick snapshot from /proc/stat.
read_load_average
Read the system load average [1m, 5m, 15m].
read_memory_mb
Read the current process RSS in megabytes.
read_os_memory_mb
Read total and available OS memory in megabytes.