×
Reboot Boards due to low Memory with notification - MikroTik Script RouterOS

Reboot Boards due to low Memory with notification - MikroTik Script RouterOS

set this in scheduler to get lost memory back and to get a reboot when it needs to do this

:global datum [/system clock get date];
:global time [/system clock get time];
/system resource
:if ([get free-memory]< 25000) do=[
/tool e-mail send server=*.*.*.* to="alert@yours.net" subject=[/system identity get name] 
from="alert@yours.net" body=(" on $datum at $time the memory on this repeater got to ", [/system resource 
get free-memory])
/system reboot;
]};
on the if statement you will need to set the 25000 depending on board type IE 532a = 25000 153 = 12000 and so on I put this in scheduler to run at 3am once a day

Using percentages

:global datum [/system clock get date];
:global time [/system clock get time];
:local percentfree ((100 * [/system resource get free-memory]) / [/system resource get total-memory])

/system resource
:if ($percentfree < 5) do={
  /tool e-mail send server=*.*.*.* to="alert@yours.net" subject=[/system identity get name] from="alert@yours.net" body=(" on $datum at $time the memory on this repeater got to ", [/system resource get free-memory])
  /system reboot;
};
Will notify and reboot if free memory < 5%
×

Notice!!

All Quantic user are requested to use our hybrid cloud drive for you project and Data base . We had added new module of cronjob to schedule and optimise your backup .