Difference between revisions of "Display voltage for Mipsbe devices"

From MikroTik Wiki
Jump to: navigation, search
(Related Links:)
Line 43: Line 43:
 
==Related Links:==
 
==Related Links:==
  
[http://www.bodybuildingrevealed.com/'''body building''']
+
* [http://www.anabolic.ca'''bodybuilding''']
 +
* [http://www.fitness-questions.com'''fitness questions''']
 +
* [http://www.supplementreview.ca'''supplement reviews''']

Revision as of 00:21, 27 August 2010

This is if you want to show the voltage on Mikrotik routers in The Dude. This currently only works on boards with the Mipbe 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: .1.3.6.1.4.1.14988.1.1.3.9.0
 voltage: .1.3.6.1.4.1.14988.1.1.3.8.0


This translates to the following oid:

 iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrHealth.8.0

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


oid("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrHealth.8.0")
/10


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


concatenate(
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

savagedavid

Related Links: