gpu_status: Live NVIDIA GPU status snapshot

View source: R/gpu.R

gpu_statusR Documentation

Live NVIDIA GPU status snapshot

Description

Queries nvidia-smi for current graphics clock, memory clock, memory used, power draw and utilisation. Used to catch the "throttled" state where a laptop dGPU reports 99% utilisation but is running its cores at idle clock speeds (typically because the laptop is on battery, in a power-saver profile, or persistence mode is off). In that state throughput drops ~10x and each LLM call takes 20-30s instead of 2-3s.

Usage

gpu_status(throttled_clock_mhz = 800, loaded_mib = 500)

Arguments

throttled_clock_mhz

Threshold below which the graphics clock is considered throttled. Defaults to 800 MHz (a modern dGPU under real inference load should be 1500-2500 MHz).

loaded_mib

Threshold at which VRAM is considered "in use by a model" (avoids false-positive throttling at rest, when idle clocks are expected and normal). Defaults to 500 MiB.

Details

Returns available = FALSE on non-NVIDIA systems; the Metal / ROCm equivalents don't expose live clock data through a portable CLI.

Value

A list with available, graphics_clock_mhz, memory_clock_mhz, memory_used_mib, memory_total_mib, power_draw_w, utilisation_pct, throttled (logical), and hint (short human-readable action if throttled).

Examples


s <- gpu_status()
if (isTRUE(s$throttled)) message(s$hint)


screenllm documentation built on Sept. 24, 2026, 5:11 p.m.