mirror of
https://github.com/furaihan/simple-mikrotik-script.git
synced 2025-07-02 02:34:30 +02:00
minor changes
This commit is contained in:
parent
1208be7fc0
commit
6307f7de28
4 changed files with 6 additions and 5 deletions
|
@ -6,11 +6,13 @@ local setup do={
|
|||
global cpuarray
|
||||
set cpuarray ([/system resource get value-name=cpu-load],$cpuarray)
|
||||
}
|
||||
#Change the value below to change the number of CPU load sample to average
|
||||
local cpusample 20
|
||||
for i from=1 to=[$cpusample -1] do={
|
||||
$setup
|
||||
}
|
||||
local totalcpuarray 0
|
||||
#calculating the average
|
||||
foreach value in=$cpuarray do={ set totalcpuarray ($totalcpuarray + $value)}
|
||||
:put $totalcpuarray
|
||||
local avgcpu ($totalcpuarray / [:len $cpuarray])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue