From b2eadc3e26c201b364e2868e25aefc0a44c35559 Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch> Date: Mon, 12 Mar 2018 16:24:46 +0100 Subject: [PATCH] Use load value from CPU monitoring class. --- ATxService/AutoTx.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ATxService/AutoTx.cs b/ATxService/AutoTx.cs index 0b71c5b..4af8b97 100644 --- a/ATxService/AutoTx.cs +++ b/ATxService/AutoTx.cs @@ -532,7 +532,7 @@ namespace ATxService // check all system parameters for valid ranges and remember the reason in a string // if one of them is failing (to report in the log why we're suspended) - if (SystemChecks.GetCpuUsage() >= _config.MaxCpuUsage) + if (_cpu.Load() >= _config.MaxCpuUsage) limitReason = "CPU usage"; else if (SystemChecks.GetFreeMemory() < _config.MinAvailableMemory) limitReason = "RAM usage"; -- GitLab