From 38617aac57b5dc0ccbbc80f4a05d701474bc4b6f Mon Sep 17 00:00:00 2001 From: Gavin Halliday Date: Tue, 8 Oct 2024 17:35:55 +0100 Subject: [PATCH] Final changes? Signed-off-by: Gavin Halliday --- system/jlib/jdebug.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/system/jlib/jdebug.cpp b/system/jlib/jdebug.cpp index 233647df2ac..5fa81ba1b96 100644 --- a/system/jlib/jdebug.cpp +++ b/system/jlib/jdebug.cpp @@ -1186,6 +1186,16 @@ bool SystemInfo::update(unsigned flags) processLines(contents, processLine); done = true; } + else + { + //Some systems with version 1 cgroups have the information in /sys/fs/cgroup/cpu//cpu.stat + filename.clear().appendf("/sys/fs/cgroup/cpu/%s/cpu.stat", cgroup); + if (loadBinaryFile(contents.clear(), filename.str(), false)) + { + processLines(contents, processLine); + done = true; + } + } } //If the version 2 file was not found look for ther version 1 information in cgroup/cpu