About "b" meaning "byte" and bit
Hi all :)
I think that this issue has already been discussed on this list, but
google didn't find anything interesting, so I'm bringing the subject again.
The output of "tc" uses "b" meaning "byte" and "bit" for "bit". The
"official" suffixes for those units are "B" and "b", respectively, and on top of this, I'm not sure if "kbit" means "kilobit" or "kibibit" in "tc" output.
I haven't had time to look at iproute2 sources, so I don't know if
this should be dealt with in iproute2 or in the kernel itself. Most of the kernel has switched to SI units already, and IMHO most of the utils should do the same, to avoid the endless problem of SI vs. binary units.
This said, maybe this weird syntas is used in tc so third party apps
can parse the output. These apps certainly will break if a change in the syntax is made, but otherwise I see no reason to keep using "b" instead of "B" and "bit" instead of "b". Currently the only way of having a sane syntax (and not only regarding units...) is "tcng"·
If such a modification is seen as appropriate, I volunteer to make
the patch.
Raúl Núñez de Arenas Coronado
Signature · 6 lines
Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen! _______________________________________________ LARTC mailing list [email protected] http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 11 lines · DervishD
Hi all :)
I think that this issue has already been discussed on this list, but
google didn't find anything interesting, so I'm bringing the subject again.The output of "tc" uses "b" meaning "byte" and "bit" for "bit". The
"official" suffixes for those units are "B" and "b", respectively, and on top of this, I'm not sure if "kbit" means "kilobit" or "kibibit" in "tc" output.
SEE below that was taken form this URL
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
Please read: tc tool (not only HTB) uses shortcuts to denote units of rate. kbps means kilobytes and kbit means kilobits ! This is the most FAQ about tc in linux.
Signature · 2 lines
Thank you Indunil Jayasooriya
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Hi Indunil :)
* Indunil Jayasooriya <[email protected]> dixit:
Quoted 13 lines · DervishD
Quoted 11 lines
Hi all :)
I think that this issue has already been discussed on this list, but
google didn't find anything interesting, so I'm bringing the subject again.The output of "tc" uses "b" meaning "byte" and "bit" for "bit". The
"official" suffixes for those units are "B" and "b", respectively, and on top of this, I'm not sure if "kbit" means "kilobit" or "kibibit" in "tc" output.
Quoted 8 lines
SEE below that was taken form this URL
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
Please read: tc tool (not only HTB) uses shortcuts to denote units of rate. kbps means kilobytes and kbit means kilobits ! This is the most FAQ about tc in linux.
Yes, I already knew that, what I was asking is why SI units are not
used and "shortcuts" are used instead: see my original message, I was not sure if kilobit was being used correctly (meaning 1000 bits) or if it was being used mistakenly for kibibit (1024 bits), and on top of that, why "b" was being used as byte when the SI prefix for byte is "B".
I mean, tc doesn't seem to follow any standard except maybe in
kilobit (which should be then used as kb, not kbit).
Raúl Núñez de Arenas Coronado
Signature · 7 lines
Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen! We are waiting for 13 Feb 2009 23:31:30 +0000 ... _______________________________________________ LARTC mailing list [email protected] http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 24 lines · DervishD
Hi Indunil :)
* Indunil Jayasooriya <[email protected]> dixit:
Quoted 12 lines · DervishD
Quoted 11 lines
Hi all :)
I think that this issue has already been discussed on this list, but
google didn't find anything interesting, so I'm bringing the subject again.The output of "tc" uses "b" meaning "byte" and "bit" for "bit". The
"official" suffixes for those units are "B" and "b", respectively, and on top of this, I'm not sure if "kbit" means "kilobit" or "kibibit" in "tc" output.Quoted 8 lines
SEE below that was taken form this URL
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
Please read: tc tool (not only HTB) uses shortcuts to denote units of rate. kbps means kilobytes and kbit means kilobits ! This is the most FAQ about tc in linux.
Quoted 5 lines
Yes, I already knew that, what I was asking is why SI units are not
used and "shortcuts" are used instead: see my original message, I was not sure if kilobit was being used correctly (meaning 1000 bits) or if it was being used mistakenly for kibibit (1024 bits), and on top of that, why "b" was being used as byte when the SI prefix for byte is "B".
It got changed so kbit means 1000 when S.Hemminger took over maintenance IIRC.
Quoted 3 lines
I mean, tc doesn't seem to follow any standard except maybe in
kilobit (which should be then used as kb, not kbit).
I think changing kb and kbit would break too many existing scripts.
Quoted 3 lines
Raúl Núñez de Arenas Coronado
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Hi Andy :)
* Andy Furniss <[email protected]> dixit:
Quoted 9 lines
Quoted 5 lines · DervishD
Yes, I already knew that, what I was asking is why SI units are not
used and "shortcuts" are used instead: see my original message, I was not sure if kilobit was being used correctly (meaning 1000 bits) or if it was being used mistakenly for kibibit (1024 bits), and on top of that, why "b" was being used as byte when the SI prefix for byte is "B".It got changed so kbit means 1000 when S.Hemminger took over maintenance IIRC.
Ok, thanks :))
Quoted 4 lines
Quoted 2 lines
I mean, tc doesn't seem to follow any standard except maybe in
kilobit (which should be then used as kb, not kbit).I think changing kb and kbit would break too many existing scripts.
That's the problem with scripts that insist blindly on parsing
command output, specially with commands whose output may (and should) change regularly when improvements are made. I supposed this was the reason. Does "tc" have another interface, preferably in "sys" or "proc" or the only way of getting the information is asking the kernel directly (through "tc", for example).
Thanks a lot for your answer :)
Raúl Núñez de Arenas Coronado
Signature · 7 lines
Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen! We are waiting for 13 Feb 2009 23:31:30 +0000 ... _______________________________________________ LARTC mailing list [email protected] http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc