Skip to content

perf(status): no Proxmox Perl CLI per slot - #44

Open
Variiuz wants to merge 2 commits into
mainfrom
perf/status-no-perl
Open

Variiuz wants to merge 2 commits into
mainfrom
perf/status-no-perl

Conversation

@Variiuz

@Variiuz Variiuz commented Nov 11, 2026

Copy link
Copy Markdown
Owner

mayfly status took about 52 s on a 16-slot host. Each slot ran qm status and qm config (each starts the Proxmox Perl CLI, about 1 s), systemctl is-active, and qm guest exec for the JOB column (up to 15 s when the agent is slow).

Now:

  • GUEST comes from the qemu pid file (VMs) or lxc-info (containers), as the slot loop already does. It shows running or stopped.
  • The runner name comes from the description in the guest's config file (/etc/pve/qemu-server/<id>.conf, the percent-encoded # lines at the top) instead of qm config.
  • SERVICE: one systemctl is-active call for all slots.
  • JOB: GitHub's busy flag when it knows the runner (busy or online). The guest is asked only when the runner is offline or unknown, or GitHub can't be reached.

Output format is unchanged. Tests cover the description parser and check that status makes no qm status/qm config calls and one systemctl call.

Tested: cargo fmt, clippy, cargo test.

Notes: mayfly status is fast on hosts with many slots.


Generated by Claude Code

`mayfly status` took about 52 s on a 16-slot host: each slot ran `qm status`
and `qm config` (each starts the Proxmox Perl CLI), `systemctl is-active`, and
`qm guest exec` (up to 15 s) for the JOB column.

The guest state now comes from the qemu pid file or lxc-info, the runner name
from the `#` description lines of the guest's config file, every slot's
service from one `systemctl is-active` call, and JOB from GitHub's busy flag.
The guest is asked only when GitHub does not know the runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GGBbe8FgqqUCF5fNkd9Ndi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants