mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-04 04:02:30 +02:00
A new "Resources" column between Stream Info and Actions: which process is producing the channel (the fanout daemon's native remuxer, ffmpeg, or PHP for the LLOD segmenter / loopback relay), the CPU it is burning and the memory it holds. With the native remuxer now an option per stream, "what does this channel actually cost" and "which backend is it on" are the two questions the list could not answer. ProcessManager reads both from /proc/PID/stat (fields 14/15 and 24, with the page size derived rather than assumed — 64K pages are normal on arm64). CPU there is cumulative, so a percentage needs two readings: cron:streams samples each producer once a pass and folds cpu/mem/producer into the stream's progress_info, carrying the previous reading in the same JSON to subtract from. cpuPercent() returns null rather than a wild figure when the pair says nothing — no previous sample, same instant, or a counter that went backwards because the producer restarted. Only the node running a stream can read its own /proc, so the sampling happens there and reaches the panel in the row the cron already writes; MAIN just renders it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UZP7fc2Hz36wbPmuLd9F9o