diff options
author | Christian Hesse <mail@eworm.de> | 2023-02-14 20:09:41 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-02-14 20:24:06 +0100 |
commit | c48509683c556aacde6b4fcbbdd53f2c77d38077 (patch) | |
tree | 0072c6ba81d9130d103c637f340b2fca6482604a /check-health | |
parent | e50e25c6388aa4fea38e465fc053283719a79805 (diff) |
check-health: wording: load -> utilization
The load is defined as something different...
https://en.wikipedia.org/wiki/Load_(computing)
So let's update the wording and use 'utilization' instead.
---- ✂️ ----
🧮️📈️ Health warning: CPU utilization
The average CPU utilization on MikroTik is at 76%!
---- ✂️ ----
🧮️📉️ Health recovery: CPU utilization
The average CPU utilization on MikroTik decreased to 64%.
---- ✂️ ----
Diffstat (limited to 'check-health')
-rw-r--r-- | check-health | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/check-health b/check-health index a9a9dbf..e208bac 100644 --- a/check-health +++ b/check-health @@ -10,8 +10,8 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } -:global CheckHealthCPULoad; -:global CheckHealthCPULoadNotified; +:global CheckHealthCPUUtilization; +:global CheckHealthCPUUtilizationNotified; :global CheckHealthFreeRAMNotified; :global CheckHealthLast; :global CheckHealthTemperature; @@ -37,18 +37,18 @@ $ScriptLock $0; :local Resource [ /system/resource/get ]; -:set CheckHealthCPULoad (($CheckHealthCPULoad * 4 + ($Resource->"cpu-load") * 10) / 5); -:if ($CheckHealthCPULoad > 750 && $CheckHealthCPULoadNotified != true) do={ +:set CheckHealthCPUUtilization (($CheckHealthCPUUtilization * 4 + ($Resource->"cpu-load") * 10) / 5); +:if ($CheckHealthCPUUtilization > 750 && $CheckHealthCPUUtilizationNotified != true) do={ $SendNotification2 ({ origin=$0; \ - subject=([ $SymbolForNotification "abacus,chart-increasing" ] . "Health warning: CPU load"); \ - message=("The average CPU load on " . $Identity . " is at " . ($CheckHealthCPULoad / 10) . "%!") }); - :set CheckHealthCPULoadNotified true; + subject=([ $SymbolForNotification "abacus,chart-increasing" ] . "Health warning: CPU utilization"); \ + message=("The average CPU utilization on " . $Identity . " is at " . ($CheckHealthCPUUtilization / 10) . "%!") }); + :set CheckHealthCPUUtilizationNotified true; } -:if ($CheckHealthCPULoad < 650 && $CheckHealthCPULoadNotified = true) do={ +:if ($CheckHealthCPUUtilization < 650 && $CheckHealthCPUUtilizationNotified = true) do={ $SendNotification2 ({ origin=$0; \ - subject=([ $SymbolForNotification "abacus,chart-decreasing" ] . "Health recovery: CPU load"); \ - message=("The average CPU load on " . $Identity . " decreased to " . ($CheckHealthCPULoad / 10) . "%.") }); - :set CheckHealthCPULoadNotified false; + subject=([ $SymbolForNotification "abacus,chart-decreasing" ] . "Health recovery: CPU utilization"); \ + message=("The average CPU utilization on " . $Identity . " decreased to " . ($CheckHealthCPUUtilization / 10) . "%.") }); + :set CheckHealthCPUUtilizationNotified false; } :local CheckHealthFreeRAM ($Resource->"free-memory" * 100 / $Resource->"total-memory"); |