iproute2: tc.8: update UNITS section.

- rename section UNITS to PARAMETERS.
- break section PARAMETERS down to four subsections to cover the
  common used parameter types(RATES, TIMES, SIZES, VALUES).
- add some explaination for IEC units in RATES.
- point out the max value we can set for RATES, TIMES and SIZES.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
This commit is contained in:
Li Wei 2012-08-28 20:41:56 +00:00 committed by Stephen Hemminger
parent 93b7986345
commit 8325daf7de
1 changed files with 88 additions and 28 deletions

View File

@ -257,10 +257,32 @@ qdiscs applies.
FILTERS FILTERS
Filters have a three part ID, which is only needed when using a hashed Filters have a three part ID, which is only needed when using a hashed
filter hierarchy. filter hierarchy.
.SH UNITS
All parameters accept a floating point number, possibly followed by a unit. .SH PARAMETERS
.P The following parameters are widely used in TC. For other parameters,
Bandwidths or rates can be specified in: see the man pages for individual qdiscs.
.TP
RATES
Bandwidths or rates.
These parameters accept a floating point number, possibly followed by
a unit (both SI and IEC units supported).
.RS
.TP
bit or a bare number
Bits per second
.TP
kbit
Kilobits per second
.TP
mbit
Megabits per second
.TP
gbit
Gigabits per second
.TP
tbit
Terabits per second
.TP .TP
bps bps
Bytes per second Bytes per second
@ -271,33 +293,26 @@ Kilobytes per second
mbps mbps
Megabytes per second Megabytes per second
.TP .TP
kbit gbps
Kilobits per second Gigabytes per second
.TP .TP
mbit tbps
Megabits per second Terabytes per second
.TP
bit or a bare number
Bits per second
.P .P
Amounts of data can be specified in: To specify in IEC units, replace the SI prefix (k-, m-, g-, t-) with
.TP IEC prefix (ki-, mi-, gi- and ti-) respectively.
kb or k
Kilobytes
.TP
mb or m
Megabytes
.TP
mbit
Megabits
.TP
kbit
Kilobits
.TP
b or a bare number
Bytes.
.P .P
Lengths of time can be specified in: TC store rates as a 32-bit unsigned integer in bps internally,
so we can specify a max rate of 4294967295 bps.
.RE
.TP
TIMES
Length of time. Can be specified as a floating point number
followed by an optional unit:
.RS
.TP .TP
s, sec or secs s, sec or secs
Whole seconds Whole seconds
@ -308,6 +323,51 @@ Milliseconds
us, usec, usecs or a bare number us, usec, usecs or a bare number
Microseconds. Microseconds.
.P
TC defined its own time unit (equal to microsecond) and stores
time values as 32-bit unsigned integer, thus we can specify a max time value
of 4294967295 usecs.
.RE
.TP
SIZES
Amounts of data. Can be specified as a floating point number
followed by an optional unit:
.RS
.TP
b or a bare number
Bytes.
.TP
kbit
Kilobits
.TP
kb or k
Kilobytes
.TP
mbit
Megabits
.TP
mb or m
Megabytes
.TP
gbit
Gigabits
.TP
gb or g
Gigabytes
.P
TC stores sizes internally as 32-bit unsigned integer in byte,
so we can specify a max size of 4294967295 bytes.
.RE
.TP
VALUES
Other values without a unit.
These parameters are interpreted as decimal by default, but you can
indicate TC to interpret them as octal and hexadecimal by adding a '0'
or '0x' prefix respectively.
.SH TC COMMANDS .SH TC COMMANDS
The following commands are available for qdiscs, classes and filter: The following commands are available for qdiscs, classes and filter:
.TP .TP