Live usage: CPU %, memory used and disk used #12

Closed
opened 2026-11-02 22:55:42 +01:00 by Duckboot · 0 comments
Owner

Why

The TUI only shows configured resources. To see which guest needs more CPU, RAM or disk before it becomes a problem, you need what is actually in use.

Proposal

  • Main table: CPU % and memory used (MiB or %), from the data get guests already returns (cpu, mem, maxmem, disk).
  • Info screen, Resources section: "in use" next to each configured value, from status/current.
  • Optional: a short trend over the last hour from rrddata.

cv4pve-cli (2.4.0)

  • get guests -o json. It already has cpu, mem, disk, maxmem and maxdisk.
  • api get /nodes/<node>/<qemu|lxc>/<vmid>/status/current -o json
  • get guest rrddata <node> <vmtype> <vmid> hour

Notes

  • For VMs, disk is usually 0 unless the guest agent reports it, so show "-" rather than a misleading 0.
  • /cluster/resources lags a few seconds behind.

Done when

  • Usage is shown in the table and on the info screen.
  • Tests are written first.
  • A read-only live check passes.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

## Why The TUI only shows configured resources. To see which guest needs more CPU, RAM or disk before it becomes a problem, you need what is actually in use. ## Proposal - Main table: CPU % and memory used (MiB or %), from the data `get guests` already returns (`cpu`, `mem`, `maxmem`, `disk`). - Info screen, Resources section: "in use" next to each configured value, from `status/current`. - Optional: a short trend over the last hour from `rrddata`. ## cv4pve-cli (2.4.0) - `get guests -o json`. It already has `cpu`, `mem`, `disk`, `maxmem` and `maxdisk`. - `api get /nodes/<node>/<qemu|lxc>/<vmid>/status/current -o json` - `get guest rrddata <node> <vmtype> <vmid> hour` ## Notes - For VMs, `disk` is usually 0 unless the guest agent reports it, so show "-" rather than a misleading 0. - `/cluster/resources` lags a few seconds behind. ## Done when - Usage is shown in the table and on the info screen. - Tests are written first. - A read-only live check passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Duckboot added the
priority
2-medium
label 2026-11-02 22:55:42 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Duckboot/cv4pve-cli-tui#12