Mikrotik температура процессора как посмотреть
General resource menu shows overall resource usage and router statistics like uptime, memory usage, disk usage, version etc.
It also has several sub-menus for more detailed hardware statistics like PCI, IRQ and USB.
Temperature
PoE-out consumption
If a device has PoE-out, then the fan RPM will change as described below:
PoE-out load | RPM % of max FAN speed (DC fans) |
---|---|
0%..24% | FAN speed 0% |
25%..46% | FAN speed 25% |
47%..70% | FAN speed 50% |
71%..92% | FAN speed 75% |
93%.. | FAN speed 100% |
For devices with PWM fans, the speed will linearly increase or decrease from 9..88% (note: below 100W the fan RPM=0)
CPU and SFP temperature
If CPU or SFP temperatures exceed 58C, the fans will start to spin. The higher the temperature, the faster the fans will spin. For devices with PWM fans, as the CPU or SFP temperatures exceed 58C, the fans will linearly increase their RPM to try to keep the temperature at 58C if possible. For devices with DC fans, as the CPU or SFP temperatures exceed 58C, the fans will start spinning but at a higher minimum RPM by default. This may result in cooling the device to the point where the fans turn-off completely. After which the temperature may slowly increase to 58C and the fans will turn on again. Currently, there is one exception. The S+RJ10 modules have a temperature threshold of 65C before they trigger the fans. Since it's a higher temperature threshold, the fans will start spinning at a higher initial speed to cool the device.
Note: All readings are approximate and may not be 100% precise. Their purpose is to ~inform users about possible/upcoming failures.
Wed Jan 10, 2018 1:44 pm
Hi! I have used a lot this forum to solve a bunch of problems, and today i would like to contribute a little.
Here is a small script to monitore the temperature of a CCR 1036, and send a email if its ok, or send a sms if its above the limit.
Here in brazil temperatures can rise very quick in the summer, so i want to know if the A/C its ok!
After the script just make a scheduler to run every 30min.
________________________________________________________________________________
:global tcasinha [/system health get temperature]
:local emessage ("Temperature is " . [:pick $tcasinha 0 2] . "." . [:pick $tcasinha 2 3])
:if ($tcasinha >= 40) do= :log info $tcasinha
/tool sms send usb3 "yourcellphonehere" message=$emessage
> else= /tool e-mail send to="youremailhere" subject="TEMP_CASINHA" body=$emessage start-tls=yes
>
________________________________________________________________________________
Sun Jan 14, 2018 6:02 pm
Fri Feb 02, 2018 2:50 am
Fri Feb 02, 2018 5:55 am
If both SSIDs are good quality signal, most modern devices choose 5GHz for the speed.
viewtopic.php?f=7&t=176537
!) Safe Mode is your friend;
Wed Feb 07, 2018 9:42 am
In a situation where you have other schedulers on your router, how will the scheduler know which script to run??
Sat Mar 03, 2018 6:18 pm
Seems Good.
I would like to provide some feedback on the script.
Let's say what if we schedule it to run every 5 minutes? It will run, & do following
- Check temperature, compare it with threshold value , if condition true, LOG & Send SMS Alert.
Now after 5 minutes , the script executes again, & do the following .
- Check temperature, compare it with threshold value , if condition true, LOG & Send SMS Alert AGAIN.
& repeats actions after every 5 minutes. What if the temperature remains above threshold value all day long & no one available at support to rectify that? You will receive annoying messages many many times or specific action many times.
To prevent this, what you can do is to add IF statement . like IF the Threshold value reaches, send SMS, and then create an empty file name sms_sent.txt
Now you should add a check option before sending sms that if "sms_sent.txt" file is available, then Don't sms send, because sms already sent , just log warning in LOG window. once temperature goes ok, then just delete sms_sent.txt file, there are other tuning you might want to do like once temperate comes ok, then send OK sms once only by adding second check as well.
_____________
Regard's
Fri Sep 06, 2019 3:58 pm
I know this post is well over a year old, but since no one has responded to it I thought I would.
This is a reply to aacable.
These are a few sample scripts I created that looks for the system temperature on a MikroTik, logs the current temp, and sends an alert at different temperature checkpoints. It also resets itself so it only sends one alert per temperature checkpoint until it is finally back within spec.
The first script runs on a RB3011 and is a direct export from the MikroTik running WinBox 6.45.3. The script only reads the system temperature, not the CPU temperature.
/system script
add dont-require-permissions=no name=Check-system-Temp owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive source tempstatus\"\r\
\n:global \"templaststatus\"\r\
\n:global \"systemtemp\" [/system health get temperature]\r\
\n:if (systemtemp > \"50\") do=\
\r\
\n:if (systemtemp > \"60\") do=\
\r\
\n:if (systemtemp < \"40\") do=\">\r\
\n:if (\$\"tempstatus\" != \$\"templaststatus\") do <\r\
\n/tool e-mail send to=\"your-email-here@email.com\" subject=(\"This router \
\$[/system identity get name] has a temperature alert. \$[/system clock ge\
t date] \$tempstatus\") body=(\"This router \$[/system identity get name] \
has a temperature alert. \$[/system clock get date] \$tempstatus - \$syste\
mtemp Celcius\")\r\
\n:log info \"Email sent about system \$tempstatus status\"\r\
\n:set \"templaststatus\" \$\"tempstatus\"\r\
\n>"
Here is the same script but for "us simple folk", it does not include the permissions policies or script name.
:global "tempstatus"
:global "templaststatus"
:global "systemtemp" [/system health get temperature]
:if (systemtemp > "50") do=
:if (systemtemp > "60") do=
:if (systemtemp < "40") do=
:if ($"tempstatus" != $"templaststatus") do /tool e-mail send to="your-email-here@email.com" subject=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $tempstatus") body=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $tempstatus - $systemtemp Celcius")
:log info "Email sent about system $tempstatus status"
:set "templaststatus" $"tempstatus"
>
Here is the scheduler to run the script every 10 minutes to check for changes. This is a direct export from the MikroTik.
/system scheduler
add interval=10m name="Check system Temp" on-event=Check-system-Temp policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive start-time=\
startup
This below script checks the system temp and cpu temp, logs the data and emails you alerts at each temperature checkpoint. This was run on a CCR1036 running WinBox 6.42.6.
:global "tempstatus"
:global "templaststatus"
:global "cputempstatus"
:global "cputemplaststatus"
:global "systemtemp" [/system health get temperature]
:global "cputemp" [/system health get cpu-temperature]
:if (systemtemp > "50") do=
:if (systemtemp > "60") do=
:if (systemtemp < "40") do=
:if (cputemp > "65") do=
:if (cputemp > "75") do=
:if (cputemp < "64") do=
:if ($"tempstatus" != $"templaststatus") do /tool e-mail send to="your-email-here@email.com" subject=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $tempstatus") body=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $tempstatus - $systemtemp Celcius")
:log info "Email sent about system $tempstatus status"
:set "templaststatus" $"tempstatus"
>
:if ($"cputempstatus" != $"cputemplaststatus") do /tool e-mail send to="your-email-here@email.com" subject=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $cputempstatus") body=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $cputempstatus - $cputemp Celcius")
:log info "Email sent about system $cputempstatus status"
:set "cputemplaststatus" $"cputempstatus"
>
You could build the same scheduler for the system temp and cpu temp script and have it run every 10 minutes as well.
I have altered the script so many times from the original one I found online that I forgot where it came from. Obviously the sample script I found online was a lot simpler than mine and was for something else entirely.
Mon Sep 09, 2019 8:05 am
Please edit your post.
Select code block and click the >button above the text field to code tag scripts.
:global "systemtemp" [/system health get temperature]
:global "cputemp" [/system health get cpu-temperature]
Scipt should also test if these two gives a value in return since hAP lite does not give none, hex gives temperature but not cpu-temperature, so they will fail.
Why use global variable? her could local variable be used.
Try Splunk> to monitor your MikroTik Router(s). How to set it up.
Mon Sep 09, 2019 2:31 pm
Thanks for the tip on the code tags Jotne, I have edited my original post.
As for using :global instead of :local, there wasn't a reason besides being able to see the script output on the script>Environment tab. That way you can check your work to make sure it's outputting the correct data. Also since I'm using global, I can use the temperature readings for other scripts if I needed to.
My script doesn't check for returned values because I wrote it for the RB3011 and CCR1036. Anyone can alter it for whatever MikroTik they choose to use. I wrote two sample scripts, one to check for system temperature and one to check for system&cpu temperature.
Please edit your post.
Select code block and click the >button above the text field to code tag scripts.
:global "systemtemp" [/system health get temperature]
:global "cputemp" [/system health get cpu-temperature]
Scipt should also test if these two gives a value in return since hAP lite does not give none, hex gives temperature but not cpu-temperature, so they will fail.
Why use global variable? her could local variable be used.
Mon Sep 09, 2019 3:42 pm
As for using :global instead of :local, there wasn't a reason besides being able to see the script output on the script>Environment tab.
Try Splunk> to monitor your MikroTik Router(s). How to set it up.
Mon Sep 09, 2019 3:54 pm
Wed Sep 11, 2019 9:46 am
I know this post is well over a year old, but since no one has responded to it I thought I would.
This is a reply to aacable.
These are a few sample scripts I created that looks for the system temperature on a MikroTik, logs the current temp, and sends an alert at different temperature checkpoints. It also resets itself so it only sends one alert per temperature checkpoint until it is finally back within spec.
The first script runs on a RB3011 and is a direct export from the MikroTik running WinBox 6.45.3. The script only reads the system temperature, not the CPU temperature.
Code: Select all
/system scriptadd dont-require-permissions=no name=Check-system-Temp owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive source tempstatus\"\r\
\n:global \"templaststatus\"\r\
\n:global \"systemtemp\" [/system health get temperature]\r\
\n:if (systemtemp > \"50\") do=\
\r\
\n:if (systemtemp > \"60\") do=\
\r\
\n:if (systemtemp < \"40\") do=\">\r\
\n:if (\$\"tempstatus\" != \$\"templaststatus\") do <\r\
\n/tool e-mail send to=\"your-email-here@email.com\" subject=(\"This router \
\$[/system identity get name] has a temperature alert. \$[/system clock ge\
t date] \$tempstatus\") body=(\"This router \$[/system identity get name] \
has a temperature alert. \$[/system clock get date] \$tempstatus - \$syste\
mtemp Celcius\")\r\
\n:log info \"Email sent about system \$tempstatus status\"\r\
\n:set \"templaststatus\" \$\"tempstatus\"\r\
\n>"
Here is the same script but for "us simple folk", it does not include the permissions policies or script name.
Code: Select all
:global "tempstatus":global "templaststatus"
:global "systemtemp" [/system health get temperature]
:if (systemtemp > "50") do=
:if (systemtemp > "60") do=
:if (systemtemp < "40") do=
:if ($"tempstatus" != $"templaststatus") do /tool e-mail send to="your-email-here@email.com" subject=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $tempstatus") body=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $tempstatus - $systemtemp Celcius")
:log info "Email sent about system $tempstatus status"
:set "templaststatus" $"tempstatus"
>
Here is the scheduler to run the script every 10 minutes to check for changes. This is a direct export from the MikroTik.
Code: Select all
/system scheduleradd interval=10m name="Check system Temp" on-event=Check-system-Temp policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive start-time=\
startup
This below script checks the system temp and cpu temp, logs the data and emails you alerts at each temperature checkpoint. This was run on a CCR1036 running WinBox 6.42.6.
Code: Select all
:global "tempstatus":global "templaststatus"
:global "cputempstatus"
:global "cputemplaststatus"
:global "systemtemp" [/system health get temperature]
:global "cputemp" [/system health get cpu-temperature]
:if (systemtemp > "50") do=
:if (systemtemp > "60") do=
:if (systemtemp < "40") do=
:if (cputemp > "65") do=
:if (cputemp > "75") do=
:if (cputemp < "64") do=
:if ($"tempstatus" != $"templaststatus") do /tool e-mail send to="your-email-here@email.com" subject=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $tempstatus") body=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $tempstatus - $systemtemp Celcius")
:log info "Email sent about system $tempstatus status"
:set "templaststatus" $"tempstatus"
>
:if ($"cputempstatus" != $"cputemplaststatus") do /tool e-mail send to="your-email-here@email.com" subject=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $cputempstatus") body=("This router $[/system identity get name] has a temperature alert. $[/system clock get date] $cputempstatus - $cputemp Celcius")
:log info "Email sent about system $cputempstatus status"
:set "cputemplaststatus" $"cputempstatus"
>
You could build the same scheduler for the system temp and cpu temp script and have it run every 10 minutes as well.
I have altered the script so many times from the original one I found online that I forgot where it came from. Obviously the sample script I found online was a lot simpler than mine and was for something else entirely.
IRQ Load Balancing
Sub-menu level: /system resource usb
This menu displays all available USB controllers on the board. Menu is available only if at least one USB controller is present.
Небольшой завод, небольшая серверная (2x4 метра), парк стоечных серверов, хранилищ, ИБП. Кондиционер который работает круглосуточно/круглодично.
Мир, труд, 1 мая, 7 утра звонок с завода, охрана: «Сработала пожарная сигнализация в серверной, горячая дверь, запаха гари нет.». Даю инструкцию дальнейших действий: «Вооружаемся рядом стоявшим огнетушителем, открываем дверь, еду.» По дороге звонок: «Дверь открыли, ничего не горит там жарко.» Говорю: «Оставить открытой дверь.»
Через 30 минут после первого звонка я возле серверной. Действительно жарко. Сервера неприятно шумят куллерами. Кондиционер отключен. Рубильником отключаю кондиционер, жду, включаю обратно, «пик», но не холодит. Вызываем кондционерщика обслуживающего нашу организацию, проверяем давление газа в кондиционере, газ есть но давление маленькое, добавляем газа, холодит. Закрываем дверь ждем, заходим, прохлада, сервера приятно шумят куллерами. Договариваемся об поиске места утечки. Расходимся. Шашлык. 1 мая, труд. мир.
Далее под кат.
Задача
Мониторинг температуры в серверной.
1. Всякого рода дополнительные датчики, с уведомлениями куда угодно.
Есть организация которая занимается у нас пожарной и всякого вида сигнализацией на заводе, ничего внятного предложить не смогли.
2. Принудительная вентиляция, с клапанами вентиляторами фильтрами.
Расположение серверной таково, что без проекта и подключения к этому дело разного вида служб нет возможности это сделать. Возможность конечно же есть, но желания у этих служб сводится к нулю. «Занимайся сам.»
3. Датчики в имеющемся железе.
На этом и остановился ради теста мониторинга и хоть какого то оповещения.
В серверной много разношерстного железа. И все они содержат датчики, это факт. Но выбор пал именно на Mikrotik RouterBoard 2011UAS-RM. Объясню почему.
1. Он первый на кого дует кондиционер.
2. У него нет своего куллера.
3. Наличие датчика температуры.
4. Расположен в верхней части стойки.
5. Linux.
6. Свой скриптовый язык.
7. Наличие шары SMB.
8. Возможность отправки e-mail, смс не использую.
Все что нужно сделать это проверить его температуру. Уведомить на почту. Уведомить пост охраны. Если температура превышает нужное значения.
1. На Mikrotik есть интернет отправка e-mail настроена как надо и работает.
2. Пишем скрипт проверки температуры и отправки показаний на e-mail.
Разберем :global temp1 переменная для порога температуры :set temp1 30 порог температуры :global temp2 [/system health get temperature] получаем температуру и заносим ее в переменную :if ($temp2 > $temp1) do= тут все просто если полученная температура выше порога отправляем уведомление на почту. Переменные глобальные для других скриптов.
Данные скрипт в Scheduler с выполнением раз в 30 минут, а хотя по времени как хотите.
3. Оповещение охраны на посту. Так как серверная и пост охраны на разных этажах, но сеть то одна. И на посту большой телевизор с камерами подключенный к Windows машине.
Включаем шару в Mikrotik /ip smb. Создаем пользователя, даем доступ к //mikrotik/pub.
Пишем скрипт.
Разберем. Переменная для плохой температуры :global t назначаем переменной единицу :set t 1 переменная для хорошей температуры :global f назначаем переменной нуль :set t 0 записываем в фал pub/temp.txt «0» /file set pub/temp.txt contents=$f проверяем температуру :if ($temp2 > $temp1) do= если температура выше нормы в файле pub/temp.txt 0 меняем на 1.
Данные скрипт в Scheduler с выполнением раз в 30 минут, а хотя по времени как хотите.
4. Оповещение Windows Машины на посту охраны.
Все что нужно это периодически читать файл //mikrotik/pub/temp.txt. Если в файле 0 ничего не делать, а если 1 то на экран (телевизор в моем случае) выводить большими красными буквами WARNING и другую информацию, которая будет полезна в решении проблемы. Данную программку можно спокойно написать хоть на чем. Под рукой был Delphi на нем и написали.
Да скажете колхоз и все такое, но пока такое решение. Пока беспокоить охрану не приходилось.
Прочитав статью «Микротик — Плюсы и минусы» и не найдя в ней упоминания о «сюрпризах» с радиаторами охлаждения в новых, весьма не дешевых моделях, а так же не имея возможности добавить комментарий (не дорос ещё), решил опубликовать его отдельной статьёй в песочницу. Ибо данная проблема, в моём случае, могла привести к полной неработоспособности роутеров прямо «из коробки», что неприятно, как минимум.
Являясь «железянщиком» до мозга костей, имею привычку заглядывать (до включения) в любое свежеприобретённое устройство. Как для общего развития, так и с целью контроля качества сборки, коим увы, даже именитые производители в последнее время не блещут.
Не избежали этой участи и три устройства компании Микротик. Один, дорогой, большой и сильный «Mikrotik Cloud Core Router CCR1036-12G-4S», и два, по сути управляемых свича «Cloud Router Switch CRS109-8G-1S-2HnD-IN».
Удивления моему не было предела, а радость от предусмотрительности зашкалила безмерно, когда в казалось бы замечательных во всех отношениях приборах обнаружился почти стопроцентно фатальный «сюрприз» сборки, а именно, отвалившиеся, видимо, ещё при транспортировке радиаторы охлаждения мелких чипов. Они просто лежали на элементах платы! Страшно представить, что бы произошло, подай я питание без предварительного «вскрытия».
Ещё большее удивление мне пришлось испытать при детальном изучении метода, которым эти радиаторы крепились к чипам. До отваливания они были приклеены при помощи прозрачного, тонкого как бумага материала, подозрительно похожего на двухсторонний канцелярский скотч. Этот факт, признаюсь, меня несколько озадачил, ибо качество пайки элементов и разводка платы при беглом изучении показались мне достаточно качественными. Как при этом могли допустить такой «баг» с радиаторами — не понимаю.
Не долго размышляя снял заводской «скотч» и примел вместо него теплопроводный клей известного российского производителя. Уверен, что если не на вечно, то надолго снял проблему отваливания или сползания радиаторов с чипов.
С момента описанной ситуации прошло два месяца. Роутеры работают с приличной нагрузкой без сбоев. Температурный режим стабильный.
Очень надеюсь, что представленная в статье информация будет полезна специалистам, эксплуатирующим продукцию компании Микротик, и как минимум убережет их от траты времени на поездки к поставщикам с целью замены вышедших из строя, в следствии сползания или отваливания радиаторов роутеров указанного производителя.
Ведь деньги можно заработать, нервы восстанавливаются и даже здоровье уже можно купить. А время — единственный невосполнимый ресурс. Берегите его.
Hardware that supports monitoring will display different information about hardware status, like temperature, voltage, current, fan-speed, etc.
Example on CCR1072-1G-8S+ device:
Voltage
Routers that support voltage monitoring will display supplied voltage value. In CLI/Winbox it will display volts. In scripts/API/SNMP this will be dV or value showed in CLI/Winbox multiplied by 10
Note: Routers that have PEXT and PoE power input are calibrated using PEXT, as a result, value showed over PoE can be lower than input voltage due to additional ethernet protection chains.
Note: If old revision CRS112, CRS210 and CRS109 devices are powered with PoE - Health will show correct voltage only up to 26.7V. If higher voltage will be used - Health will show constant 16V.
Properties
All properties are read-only
Property | Description |
---|---|
architecture-name (string) | CPU architecture. Can be powerpc, x86, mipsbe or mipsle. |
bad-blocks (percent) | Shows percentage of bad blocks on the NAND. |
board-name (string) | RouterBOARD model name |
cpu (string) | Cpu model that is on the board. |
cpu-count (integer) | Number of CPUs present on the system. Each core is separate CPU, Intel HT is also separate CPU. |
cpu-frequency (string) | Current CPU frequency. |
cpu-load (percent) | Percentage of used CPU resources. Combines all CPUs. Per-core CPU usage can be see in CPU submenu |
free-hdd-space (string) | Free space on hard drive or NAND |
free-memory (string) | Unused amount of RAM |
platform (string) | Platform name, usually it is "MikroTik" |
total-hdd-space (string) | Size of the hard drive or NAND |
total-memory (string) | Amount of installed RAM |
uptime (time) | Time interval passed since boot-up. |
version (string) | Installed RouterOS version number. |
write-sect-since-reboot (integer) | Number of sector writes in HDD or nand since router was last time rebooted. |
write-sect-total (integer) | Number of sector writes in total. |
Sub-menu level: /system resource cpu
This submenu shows per-cpu usage, as long as IRQ and Disk usage.
Properties
All properties are read-only
Property | Description |
---|---|
architecture-name (string) | CPU architecture. Can be powerpc, x86, mipsbe or mipsle. |
bad-blocks (percent) | Shows percentage of bad blocks on the NAND. |
board-name (string) | RouterBOARD model name |
cpu (string) | Cpu model that is on the board. |
cpu-count (integer) | Number of CPUs present on the system. Each core is separate CPU, Intel HT is also separate CPU. |
cpu-frequency (string) | Current CPU frequency. |
cpu-load (percent) | Percentage of used CPU resources. Combines all CPUs. Per-core CPU usage can be see in CPU submenu |
free-hdd-space (string) | Free space on hard drive or NAND |
free-memory (string) | Unused amount of RAM |
platform (string) | Platform name, usually it is "MikroTik" |
total-hdd-space (string) | Size of the hard drive or NAND |
total-memory (string) | Amount of installed RAM |
uptime (time) | Time interval passed since boot-up. |
version (string) | Installed RouterOS version number. |
write-sect-since-reboot (integer) | Number of sector writes in HDD or nand since router was last time rebooted. |
write-sect-total (integer) | Number of sector writes in total. |
Sub-menu level: /system resource cpu
This submenu shows per-cpu usage, as long as IRQ and Disk usage.
Properties
Property | Description |
---|---|
cpu (integer) | Identification number of CPU which usage is shown. |
load (percent) | CPU usage in percents |
irq (percent) | IRQ usage in percents |
disk (percent) | Disk usage in percents |
Sub-menu level: /system resource irq
Fan control and behaviour
Using this menu users will be able to control fan behaviour on TILE architecture devices. Currently, for other RouterBOARD devices, there is no option to manually control FAN behaviour.
Note: Improved FAN stability starting from version 6.45.5.
There are three parameters that may affect fan behaviour: PoE-out consumption, SFP temperature and CPU temperature. As soon as one of the parameters exceeds the optimal value the, fans are started.
Properties
- auto - pick CPU based on number of interrupts. Uses NAPI to optimize interrupts.
Read-only properties
Property | Description |
---|---|
active-cpu (integer) | Shows active CPU in multicore systems. |
count (integer) | Number of interrupts. On ethernet interfaces interrupt=packet. |
irq (integer) | IRQ identification number |
users (string) | Process assigned to IRQ |
Читайте также: