Linux appends " (deleted)" to /proc/{pid}/exe when the binary has been
replaced (common after PVE/QEMU package upgrades while VMs remain
running). The exact string match rejected all running QEMU processes,
resulting in zero VM metrics.
qm monitor requires a TTY to emit its prompt; the pipe-based approach
missed prompt detection on some hosts. Replace with pty.Start, refactor
readUntilMarker to scan byte-by-byte with deadline goroutine, and add
parseQMResponse to strip command echo and \r artifacts. Add unit tests
for the new reader and parser functions.
- Consolidate status reads
- Pre-allocate descriptors
- Add read_only disk label
- Remove dead stdin field
- Guard nil pool maps
- Add error-path tests
- Add go vet to flake