From 33973f7e40b6b24e219f5c9d19b205f6f9ddeed4 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Sat, 7 May 2022 16:05:11 +0200 Subject: [PATCH] Limit active CPU count under LXC as well Fixes the initial htoprc not being configured to amount for the host CPU count --- linux/LinuxProcessList.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index cc60ee8b..06644887 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -265,7 +265,7 @@ static void LinuxProcessList_updateCPUcount(ProcessList* super) { if (Running_containerized) { /* LXC munges /proc/cpuinfo but not the /sys/devices/system/cpu/ files, * so limit the visible CPUs to what the guest has been configured to see: */ - currExisting = scanAvailableCPUsFromCPUinfo(this); + currExisting = active = scanAvailableCPUsFromCPUinfo(this); } #ifdef HAVE_SENSORS_SENSORS_H