Silence the sampler pipeline's broken-pipe chatter

This commit is contained in:
Gmer4Lfe
2026-08-21 08:24:55 -04:00
parent 3d05276312
commit 666e1ebab2
+4 -1
View File
@@ -299,7 +299,10 @@ function vv_igpu_sample(): ?array {
if (trim((string)shell_exec('command -v intel_gpu_top 2>/dev/null')) === '') return null;
$raw = shell_exec('timeout 4 intel_gpu_top -J -s 600 2>/dev/null | sed -n "/^{/,/^}/p" | sed "/^}/q"');
// stderr silenced across the whole pipeline, not just the sampler. Cutting the stream short
// makes sed exit while intel_gpu_top is still writing, and it says so — "couldn't flush
// stdout: Broken pipe", once a minute, into a log the repair sweep reads as a real warning.
$raw = shell_exec('{ timeout 4 intel_gpu_top -J -s 600 | sed -n "/^{/,/^}/p" | sed "/^}/q"; } 2>/dev/null');
if (!$raw) return null;
$decoded = json_decode(trim($raw), true);