From f1962a3fd24eb05ff3dfbaa68b7703c04223dcd6 Mon Sep 17 00:00:00 2001 From: Marko Myllynen Date: Mon, 8 Jul 2024 13:53:38 +0300 Subject: [PATCH] pmrep conf: correct collectl cpu metrics to match current versions collectl docs state about "CPU Data, collectl -sc" the following: cpu Percent of time the cpu was busy during the current interval averaged across all CPUs and is actually the total percentage of time the CPU in one of the following: system, user, nice, irq, soft-irq and steal. Note that this does NOT include time spend in I/O wait. sys Percentage of time the cpu was executing in system mode during the current interval. This includes all those modes as above except user and nice to to determine the amount of time spent as a user you need to subtract these from the total cpu field. Adjust the corresponding metricset formulas accordingly. No QA impact. --- src/pmrep/conf/collectl.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pmrep/conf/collectl.conf b/src/pmrep/conf/collectl.conf index 85547dc889..cc24487f35 100644 --- a/src/pmrep/conf/collectl.conf +++ b/src/pmrep/conf/collectl.conf @@ -46,9 +46,9 @@ timestamp = yes precision = 2 delimiter = " " cpu = cpu,,,,5 -cpu.formula = 100 * (rate(kernel.all.cpu.user) + rate(kernel.all.cpu.nice)) / hinv.ncpu +cpu.formula = 100 * (rate(kernel.all.cpu.sys) + rate(kernel.all.cpu.intr) + rate(kernel.all.cpu.steal) + rate(kernel.all.cpu.user) + rate(kernel.all.cpu.nice)) / hinv.ncpu sys = sys,,,,5 -sys.formula = 100 * rate(kernel.all.cpu.sys) / hinv.ncpu +sys.formula = 100 * (rate(kernel.all.cpu.sys) + rate(kernel.all.cpu.intr) + rate(kernel.all.cpu.steal)) / hinv.ncpu kernel.all.intr = intr/s,,,,7 kernel.all.pswitch = cswch/s,,,,8