[lttng-dev] [PATCH lttng-tools] lttng cli: Accept human readable sizes for --subbuf-size

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Wed Apr 3 15:36:21 EDT 2013


>>> --subbuf-size accepts sizes such as:
>>>
>>> - 123 -> 123
>>> - 123k or 123K -> 123 * 1024
>>> - 123m or 123M -> 123 * 1024 * 1024
>>> - 123g or 123G -> 123 * 1024 * 1024 * 1024
>>
>> I don't really like using non-SI prefixes such as "K", "m" or "g" 
>> (well, in fact "m" is an SI prefix but for milli, not mega).
>> I think that would be better to only use "k", "M" and "G".
>
>Agreed. I'll do that.
>Simon

   Normally I'd be the first to advocate k, M, G as powers of 10 and Ki, Mi, Gi as powers of two (ISO/IEC 80000-13:2008) but the kernel parameters use exclusively K, M, and G in the powers of two sense, and I believe just about every other part of Linux does also.  We should thus, somewhat unfortunately, stick to powers of two.  Just be sure to explicitly give the multipliers' values in the help.  Oh, and accept just the upper-case letters, like the kernel parameters do.

Daniel U. Thibault
R & D pour la défense Canada - Valcartier (RDDC Valcartier) / Defence R&D Canada - Valcartier (DRDC Valcartier)
Cyber sécurité pour les missions essentielles (CME) / Mission Critical Cyber Security (MCCS)
Protection des systèmes et contremesures (PSC) / Systems Protection & Countermeasures (SPC)
2459 route de la Bravoure
Québec, QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada / Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>



More information about the lttng-dev mailing list