feat: GPU process list with per-process VRAM/utilization and kill #12

Merged
Pakobbix merged 1 commits from feat/gpu-process-list into main 2026-10-03 18:26:19 +00:00
Collaborator

Adds a GPU process table to the Performance tab: which processes use the selected GPU, with per-process VRAM, GPU utilization, CPU, host memory, and command. Includes a kill endpoint (SIGTERM/SIGKILL, optional parent kill) behind a confirm dialog.

Endpoints

  • GET /api/processes?gpu_index=N — VRAM-sorted: pid, user, dev, type, gpu_util_pct, mem_util_pct, vram_bytes, vram_pct, cpu_pct, mem_host_bytes, command.
  • POST /api/processes/kill — {pid, signal, parent}. parent: true signals the parent (process family). Refuses init/kthreadd (pid 1/2).

Files

  • nvcurve/hal/processes.py (new) — NVML + /proc enumeration
  • nvcurve/server.py — two endpoints
  • frontend/.../ProcessList.tsx (new), App.tsx, api/client.ts, types.ts, common/ConfirmDialog.tsx (onConfirm now optional with actions)
  • tests/test_processes.py (new), Makefile, docs/API.md

Notes

  • Per-process GPU util is NVML's smoothed "recent" value (lags instantaneous) — header tooltip.
  • Kill endpoint is an arbitrary-pid signal primitive; API is open when no users are configured — enable auth before exposing on a shared system (documented).

Tests

All 4 files pass: security 26, rm_power 72, wireview 81, processes 38. Frontend builds clean; verified in a real browser.

Adds a GPU process table to the Performance tab: which processes use the selected GPU, with per-process VRAM, GPU utilization, CPU, host memory, and command. Includes a kill endpoint (SIGTERM/SIGKILL, optional parent kill) behind a confirm dialog. ## Endpoints - `GET /api/processes?gpu_index=N` — VRAM-sorted: pid, user, dev, type, gpu_util_pct, mem_util_pct, vram_bytes, vram_pct, cpu_pct, mem_host_bytes, command. - `POST /api/processes/kill` — `{pid, signal, parent}`. `parent: true` signals the parent (process family). Refuses init/kthreadd (pid 1/2). ## Files - `nvcurve/hal/processes.py` (new) — NVML + /proc enumeration - `nvcurve/server.py` — two endpoints - `frontend/.../ProcessList.tsx` (new), App.tsx, api/client.ts, types.ts, common/ConfirmDialog.tsx (onConfirm now optional with actions) - `tests/test_processes.py` (new), Makefile, docs/API.md ## Notes - Per-process GPU util is NVML's smoothed "recent" value (lags instantaneous) — header tooltip. - Kill endpoint is an arbitrary-pid signal primitive; API is open when no users are configured — enable auth before exposing on a shared system (documented). ## Tests All 4 files pass: security 26, rm_power 72, wireview 81, processes 38. Frontend builds clean; verified in a real browser.
ARIA added 1 commit 2026-10-03 18:25:40 +00:00
Add a GPU process table to the Performance tab showing which processes
use the selected GPU, with per-process VRAM, GPU utilization, CPU, host
memory, and command. Includes a kill endpoint (SIGTERM/SIGKILL, with
optional parent kill) behind a confirm dialog.

- nvcurve/hal/processes.py: NVML + /proc process enumeration
- server.py: GET /api/processes, POST /api/processes/kill (refuses to
  signal init/kthreadd)
- frontend: ProcessList component, API client, types
- tests: test_processes.py
- docs: API reference for the new endpoints
Pakobbix merged commit e89135ef94 into main 2026-10-03 18:26:19 +00:00
Pakobbix deleted branch feat/gpu-process-list 2026-10-03 18:26:19 +00:00
Sign in to join this conversation.