Page 1 of 1

/interface ethernet get tx-bytes is now an Array with three items?

Posted: Fri Apr 15, 2016 12:58 am
by paris9
ROS Version: 6.34.3 (stable)

/interface ethernet
:put [:typeof [get ether1 tx-bytes]]

This used to produce an integer as shown in this documentation, but now it's a three-part array.
http://wiki.mikrotik.com/wiki/Manual:Interface/Ethernet

Can anyone help with the documentation/definition for the output :D

Actually, its not a three part array, this is an array with a single item string.
/interface ethernet
:foreach n,v in=[get ether1 tx-bytes] do={ :put [:typeof $v]; :put ("$n-->$v") }

Output:
str
0-->4 005 558
The string has spaces...?

Re: /interface ethernet get tx-bytes is now an Array with three items?

Posted: Fri Apr 15, 2016 1:15 am
by rextended
The output is one array because one bug is present???

if the value is 9,364,244,108
the output is treated as array, because "," are present???
9 364 244 108

or the final number can be greather than one integer number and array is used to storing the value?
integer can be only between +2,147,483,647 and -2,147,483,648
the counter can not be restart to 0, and an array is the solution?

tx bits = 9*10^9 + 364*10^6 + 244*10^3 + 108*10^1

Re: /interface ethernet get tx-bytes is now an Array with three items?

Posted: Fri Apr 15, 2016 1:48 am
by paris9
The output is one array because one bug is present???

if the value is 9,364,244,108
the output is treated as array, because "," are present???
9 364 244 108

or the final number can be greather than one integer number and array is used to storing the value?
integer can be only between +2,147,483,647 and -2,147,483,648
the counter can not be restart to 0, and an array is the solution?

tx bits = 9*10^9 + 364*10^6 + 244*10^3 + 108*10^1
Thanks, your questions helped me look at it differently. It does look like the commas were just removed (although if that is the situation, it would have been nice to remove those spaces and a string instead of array.) Or perhaps its an array to help count in integers. And it would be nice to know if the counter resets itself to zero and some point :D

Re: /interface ethernet get tx-bytes is now an Array with three items?

Posted: Fri Apr 15, 2016 1:52 am
by rextended
The output is one array because one bug is present???

if the value is 9,364,244,108
the output is treated as array, because "," are present???
9 364 244 108

or the final number can be greather than one integer number and array is used to storing the value?
integer can be only between +2,147,483,647 and -2,147,483,648
the counter can not be restart to 0, and an array is the solution?

tx bits = 9*10^9 + 364*10^6 + 244*10^3 + 108*10^1
Thanks, your questions helped me look at it differently. It does look like the commas were just removed (although if that is the situation, it would have been nice to remove those spaces and a string instead of array.) Or perhaps its an array to help count in integers. And it would be nice to know if the counter resets itself to zero and some point :D
For the precision, 64 bit signed integer is between +9,223,372,036,854,775,807 and -9,223,372,036,854,775,808

The "0" is when the traffic go over 1152922 TeraByte,
With all my clients I use near 500 TeraByte / Year, for reach that amount, i must wait 2300 Years....

Or I must launch bandwidth test on one gigabit port for 293 years...

Re: /interface ethernet get tx-bytes is now an Array with three items?

Posted: Fri Apr 15, 2016 2:22 am
by paris9
The output is one array because one bug is present???

if the value is 9,364,244,108
the output is treated as array, because "," are present???
9 364 244 108

or the final number can be greather than one integer number and array is used to storing the value?
integer can be only between +2,147,483,647 and -2,147,483,648
the counter can not be restart to 0, and an array is the solution?

tx bits = 9*10^9 + 364*10^6 + 244*10^3 + 108*10^1
Thanks, your questions helped me look at it differently. It does look like the commas were just removed (although if that is the situation, it would have been nice to remove those spaces and a string instead of array.) Or perhaps its an array to help count in integers. And it would be nice to know if the counter resets itself to zero and some point :D
For the precision, 64 bit signed integer is between +9,223,372,036,854,775,807 and -9,223,372,036,854,775,808

The "0" is when the traffic go over 1152922 TeraByte,
With all my clients I use near 500 TeraByte / Year, for reach that amount, i must wait 2300 Years....

Or I must launch bandwidth test on one gigabit port for 293 years...
Haha! Thanks! That puts it in perspective....