Community discussions

MikroTik App
 
marcopolo
newbie
Topic Author
Posts: 45
Joined: Wed Feb 03, 2010 7:17 pm

OID round up not working

Wed May 19, 2010 11:15 am

Anyone help with this, the first rounds up the value to two digits, but the second shows more.

[round(((((oid("1.3.6.1.2.1.25.2.3.1.5.1")-oid("1.3.6.1.2.1.25.2.3.1.6.1"))*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)/1024)] rounds up to 11gb

[round(((oid("1.3.6.1.2.1.25.2.3.1.5.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)] rounds up to 18436gb

Any ideas?

Thanks

Mark
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: OID round up not working

Wed May 19, 2010 11:49 am

[round(((((oid("1.3.6.1.2.1.25.2.3.1.5.1")-oid("1.3.6.1.2.1.25.2.3.1.6.1"))*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)/1024)] rounds up to 11gb

[round(((oid("1.3.6.1.2.1.25.2.3.1.5.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)] rounds up to 18436gb
first time divided to 1024 3 times (formula calculates avalable disk space in GB)
second time dividet to 1024 2 times (formula calculates disk size in MB)

:)
 
marcopolo
newbie
Topic Author
Posts: 45
Joined: Wed Feb 03, 2010 7:17 pm

Re: OID round up not working

Wed May 19, 2010 1:42 pm

Cheers, I missed some calculation

[round(((oid("1.3.6.1.2.1.25.2.3.1.5.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024*1024)] rounds up to 18gb now. :D