!7 // uses advancedOSMXBean(), not OSHI cmodule ProcessCPUPercentage > DynBigNumber { transient FixedRateTimer mainTimer; transient double loadRelativeToAllCores, recentLoad; transient RollingAverage avg = new(5); // =10 seconds start { setDescription("PROCESS CPU %"); setToolTip("Percentage is per core (total: " + n2(numberOfCores(), "core") + ")"); mainTimer = doEvery(2.0, r actualUpdate); } void actualUpdate { recentLoad = processCPULoad(); avg.add(recentLoad); loadRelativeToAllCores = avg!; setValue(toIntPercent_ceil(loadRelativeToAllCores*numberOfCores()) + " %"); } }