Display voltage for Mipsbe devices

From MikroTik Wiki
Revision as of 19:44, 14 February 2011 by Pelish (Talk | contribs) (typo)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is if you want to show the voltage on Mikrotik routers in The Dude. This currently only works on boards with the Mipsbe 633mhz processor (e.g. 433AH, 493AH, 450G) Mipsbe volt 1.png

First you will need the oid for voltage. You can get this from /system health on any of the boards mentioned above

/system health print oid
 active-fan: .
 voltage: .

This translates to the following oid:


In the Dude create a new funtion. I called mine mipsbe_voltage. The code for it would be as follows:


the /10 at the bottom divides the value by 10 otherwise it displays 238 instead of 23.8V.

Once you have the function in place you should edit the function called cpu_mem_disk and add in code to display the voltage

if(cpu_usage_available(), concatenate("cpu: ", cpu_usage(), "% "), ""),
if(mem_usage() > 0, concatenate("mem: ", round(mem_usage()), "% "), ""),
if(virtual_mem_usage() > 0, concatenate("virt: ", round(virtual_mem_usage()), "% "), ""),
if(mipsbe_voltage() > 0, concatenate("volt: ", (mipsbe_voltage()), "V "), ""),
if(hdd_usage() > 0, concatenate("disk: ", round(hdd_usage()), "% "), "")

This should then display the voltage along with the other parameters below the device

Hope this helps