forked from mariusae/trickle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtrickled.8
207 lines (207 loc) · 5.18 KB
/
trickled.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
.\" $OpenBSD: mdoc.template,v 1.6 2001/02/03 08:22:44 niklas Exp $
.\"
.\" The following requests are required for all man pages.
.Dd February 27, 2003
.Dt TRICKLED 8
.Os
.Sh NAME
.Nm trickled
.Nd userspace bandwidth manager daemon
.Sh SYNOPSIS
.\" For a program: program [-abc] file ...
.Nm trickled
.Op Fl h
.Op Fl v
.Op Fl V
.Op Fl f
.Op Fl s
.Op Fl d Ar rate\fR[:\fIschedule\fR]
.Op Fl u Ar rate\fR[:\fIschedule\fR]
.Op Fl t Ar seconds
.Op Fl l Ar length
.Op Fl p Ar priority
.Op Fl c Ar file
.Op Fl n Ar path
.Op Fl N Ar seconds
.Op Fl w Ar size
.Sh DESCRIPTION
.Nm
is a userspace bandwidth manager daemon.
.Nm
manages several
.Xr trickle 1
sessions at a time, shaping across multiple sessions.
.Pp
The options are as follows:
.Bl -tag -width Ds_imagedir
.It Fl v
Increases the verbosity level (can be specified multiple times).
.It Fl V
Prints version.
.It Fl f
Runs
.Nm
in the foreground.
.It Fl s
Uses syslog for all output (instead of stderr).
.It Fl d Ar rate\fR[:\fIschedule\fR]
Limit the download bandwidth consumption to
.Ar rate
KB/s. Optionally, set a
.Ar schedule
to follow.
.It Fl u Ar rate\fR[:\fIschedule\fR]
Limit the upload bandwidth consumption to
.Ar rate
KB/s. Optionally, set a
.Ar schedule
to follow.
.It Fl t Ar seconds
Set smoothing time to
.Ar seconds
s. The smoothing time determines with what intervals
.Nm
will try to let the application transcieve data. Smaller values will
result in a more continuous (smooth) session, while larger values may
produce bursts in the sending and receiving data. Smaller values (0.1
- 1 s) are ideal for interactive applications while slightly larger
values (1 - 10 s) are better for applications that need bulk transfer.
This parameter is customizable on a per-application basis via
.Xr trickled.conf 5 .
The default value is 5 s.
.It Fl l Ar length
Set smoothing length to
.Ar length
KB. The smoothing length is a fallback of the smoothing time. If
.Nm
cannot meet the requested smoothing time, it will instead fall back on
sending
.Ar length
KB of data. The default value is 10 KB.
.It Fl p Ar priority
Set default priority to
.Ar priority .
.It Fl c Ar file
Use the configuration file
.Ar file .
This file must be of the format documented in
.Xr trickled.conf 5 .
.It Fl n Ar path
Set socket name to
.Ar path .
By default,
.Nm
uses
.Ar /tmp/.trickled.sock .
.It Fl N Ar seconds
Notifies user of total bandwidth consumption every
.Ar seconds
s.
.It Fl w Ar size
Set peak detection window size to
.Ar size
KB. This determines how aggressive
.Nm
is at eliminating bandwidth consumption peaks. Lower values will be
more aggressive, but may also result in over shaping. The default
value (512 KB) is usually sufficient.
.El
.Ss "Schedules"
Both the
.Ar -u
and
.Ar -d
flags accept one or more optional schedules, specified in the following form:
.Pp
:[\fIdays_of_week\fR][\fIstart_time\fR],[\fIend_time\fR],[\fIrate\fR]
.Pp
.Ar days_of_week
may be any of
.Ar Su M T W Th F Sa
in any order. If no day is specified, the schedule will apply for all days.
.Pp
.Ar start_time
is the 3-or-4-digit 24-hour local time to begin the new bandwidth schedule.
For example,
.Ar 1234
would mean 12:34 PM.
.Ar 123
would mean 1:23 AM.
.Ar 2345
would mean 11:45 PM.
.Pp
.Ar end_time
is the 3-or-4-digit 24-hour local time to end the bandwidth schedule.
.Pp
.Ar rate
is the bandwidth limit (in KB/s) that is enforced during the specified time.
.Pp
Multiple schedules can be string together on the command line.
If the schedules overlap, the last one takes precident.
.Sh EXAMPLES
.Cm trickled -u 10 -d 20
.Pp
Limit aggregate
.Xr trickle 1
upload bandwidth consumption to 10 KB/s and download consumption to 20 KB/s.
.Pp
.Cm trickled -d 50 -u 10:WSaSu130,145,1000:MTTh1200,300,96
.Pp
Limit aggregate
.Xr trickle 1
bandwidth consumption as follows:
.Bl -bullet
.It
constant 50 KB/s download limit
.It
1000 KB/s upload limit between 1:30 AM and 1:45 AM on Wednesdays, Saturdays, and Sundays
.It
96 KB/s upload limit between 12:00 noon and 3:00 PM on Mondays, Tuesdays, and Thursdays
.It
10 KB/s upload limit otherwise
.El
.Pp
.Cm trickled -s -u 100 -d 10000:900,1700,10
.Pp
Limit aggregate
.Xr trickle 1
bandwidth consumption as follows:
.Bl -bullet
.It
constant 100 KB/s upload limit
.It
10 KB/s download limit between 9:00 AM and 5:00 PM all days of the week
.It
10,000 KB/s download limit otherwise
.El
.\" This next request is for sections 2 and 3 function return values only.
.\" .Sh RETURN VALUES
.\" The next request is for sections 2 and 3 error and signal handling only.
.\" .Sh ERRORS
.\" This next request is for section 4 only.
.\" .Sh DIAGNOSTICS
.\" This next request is for sections 1, 6, 7 & 8 only.
.\" .Sh ENVIRONMENT
.\" .Sh FILES
.Sh SEE ALSO
.Xr trickle 1 ,
.Xr trickled.conf 5 ,
.Xr syslog 3 ,
.Xr netintro 4
.\" .Sh COMPATIBILITY
.\".Sh ACKNOWLEDGEMENTS
.\"This product includes software developed by Ericsson Radio Systems.
.\".Pp
.\"This product includes software developed by the University of
.\"California, Berkeley and its contributors.
.Sh AUTHORS
.Nm
has been developed by Marius Aamodt Eriksen
.Aq [email protected] .
.\" .Sh HISTORY
.\" .Sh BUGS
.\" Does not support executables utilizing
.\" .Xr kqueue 2 .
.\" Please report any bugs to Marius Aamodt Eriksen
.\" .Aq [email protected] .
.\" .Sh CAVEATS