Hello,
Glenn Fowler >>
<------snip------->
in this proposal is 50K == 50*1000 or is it 50Ki == 50*1024?
the same question for { Mi Gi }
also, if "and so on" means Ti ... then maybe those should be spelled out
-----------
ast has a function fmtscale(3) that handles this issue in one spot
relevance to solaris is that ksh93 exposes this function via
libast/sfprintf(3) and finally its builtin printf(1)
from ksh93 try
printf $'%#d %#i\n' 5000 5000 123456789 123456789
and it should produce
5.0k 4.9Ki
<------snip------->
In the following fields,
memory{swap,free}, page{pi,po,fr,de}, executable, anonymous, filesystem
50K == 50*1024
similarly for mega, giga, tera, peta, exa
But for the fields page reclaims and minor faults, page{re, mf}
50K == 50*1000
similarly for mega, giga, tera, peta, exa
I had not come across Ki, Mi, Gi,...
This avoids the major confusion over {1000/1024}
Looks like as of now, this convention {Ki, Mi, Gi} is still not in vague.
International Electrotechnical Commission (IEC) seems to have approved it.
Seriously planning to include this new convention in my fix.
Looking at libast/sfprintf(3).
Thanks a ton Glenn!!
Best Regards,
Manjula
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.opensolaris.org/pipermail/opensolaris-arc/attachments/20080521/f35a7265/attachment.html>