From 657027617915fb1257277c8f4f89f6cb765e1341 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Tue, 21 Jul 2026 13:43:26 -0400 Subject: [PATCH] Reverted the cgroups interleaving - Should be OK --- server/services/collectors/cgroups.js | 33 ++++++++++----------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/server/services/collectors/cgroups.js b/server/services/collectors/cgroups.js index 6e245f4..3bb2d8b 100644 --- a/server/services/collectors/cgroups.js +++ b/server/services/collectors/cgroups.js @@ -216,7 +216,6 @@ export class CgroupsCollector extends EventEmitter { /** @type {Array<{ id: string, title: string, path: string }>|null} */ this._cgCache = null this._cgTs = 0 - this._cgTick = 0 } start() { @@ -286,9 +285,6 @@ export class CgroupsCollector extends EventEmitter { } } const cgList = this._cgCache - const doMemDetail = this._cgTick % 5 === 0 - const doPressure = this._cgTick % 3 === 0 - this._cgTick++ for (const cg of cgList) { const title = resolveContainerLabel(cg.title, this._names) @@ -351,10 +347,7 @@ export class CgroupsCollector extends EventEmitter { }, }) - let memStat = null - if (doMemDetail) { - memStat = profile('memStat:' + cg.id.slice(0,20), () => parseMemoryStat(cg.path)) - } + const memStat = profile('memStat:' + cg.id.slice(0,20), () => parseMemoryStat(cg.path)) if (memStat) { batch.push({ chart: memDetailDef.id, @@ -381,19 +374,17 @@ export class CgroupsCollector extends EventEmitter { values: { throttled: throttlePct }, }) - if (doPressure) { - for (const kind of ['cpu', 'memory', 'io']) { - const some10 = parsePressureSome10(cg.path, kind) - if (some10 == null) continue - const pressureDef = makeCgroupPressureChart(cg.id, title, kind) - registerChart(pressureDef) - batch.push({ - chart: pressureDef.id, - context: 'cgroup.pressure', - ts, - values: { some10 }, - }) - } + for (const kind of ['cpu', 'memory', 'io']) { + const some10 = parsePressureSome10(cg.path, kind) + if (some10 == null) continue + const pressureDef = makeCgroupPressureChart(cg.id, title, kind) + registerChart(pressureDef) + batch.push({ + chart: pressureDef.id, + context: 'cgroup.pressure', + ts, + values: { some10 }, + }) } this.prev.set(cg.id, {