Skip to content
Snippets Groups Projects
Commit b2eadc3e authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Use load value from CPU monitoring class.

parent b309d786
Branches
No related tags found
No related merge requests found
...@@ -532,7 +532,7 @@ namespace ATxService ...@@ -532,7 +532,7 @@ namespace ATxService
// check all system parameters for valid ranges and remember the reason in a string // 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 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"; limitReason = "CPU usage";
else if (SystemChecks.GetFreeMemory() < _config.MinAvailableMemory) else if (SystemChecks.GetFreeMemory() < _config.MinAvailableMemory)
limitReason = "RAM usage"; limitReason = "RAM usage";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment