File: scamper.1

package info (click to toggle)
scamper 20070523n-1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 1,208 kB
  • ctags: 2,484
  • sloc: ansic: 26,262; makefile: 124
file content (494 lines) | stat: -rw-r--r-- 14,414 bytes parent folder | download
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
.\"
.\" scamper.1
.\"
.\" Author: Matthew Luckie <mjl@wand.net.nz>
.\"
.\" Copyright (c) 2007 University of Waikato
.\"                    All rights reserved
.\"
.\" $Id: scamper.1,v 1.10 2007/03/18 06:41:42 mjl Exp $
.\"
.Dd January 26, 2007
.Dt SCAMPER 1
.Os
.\""""""""""""
.Sh NAME
.Nm scamper
.Nd parallel Internet measurement utility
.Sh SYNOPSIS
.Nm
.Bk -words
.Op Fl ?Pv
.Op Fl c Ar command
.Op Fl p Ar pps
.Op Fl M Ar monitorname
.Op Fl s Ar sport
.Op Fl H Ar holdtime
.Op Fl o Ar outfile
.Op Fl O Ar outtype
.Op Fl i Ar addr 1..N | listfile | Fl D Ar port
.Ek
.\""""""""""""
.Sh DESCRIPTION
The
.Nm
utility provides the ability to execute Internet measurement techniques
to IPv4 and IPv6 addresses, in parallel, to fill a specified
packets-per-second rate.  Currently,
.Nm
supports the well-known traceroute and ping techniques.
.Nm
has three modes of operation.
.Pp
First,
.Nm
can be supplied a list of addresses on the command line with the
.Fl i
option.
.Nm
will then measure each of the supplied addresses, in parallel, and output
the results as each task completes.
Second,
.Nm
can be supplied a list of addresses in a listfile, one address per line.
Finally,
.Nm
can be started as a daemon listening on a port specified with the
.Fl D
option only accessible on the local host.
.Nm
will then accept connections to that port, where commands can be supplied
to scamper.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl ?
prints a list of command line options and a synopsis of each.
.It Fl P
tells scamper to use the operating system's datalink support to obtain more
accurate transmit and receive timestamps for
.Nm
probes.  This corresponds to
.Xr bpf 4
on BSD systems, and
.Xr packet 7
on Linux systems.
Datalink timestamps exclude the effects of route-lookup delays, as
well as overheads in a packet making it to and from the network interface.
.It Fl v
causes
.Nm
to output version information and exit.
.It Fl c Ar command
specifies the command for
.Nm
to use by default. The current choices for this option are trace and ping.
.Nm
uses trace by default.
.It Fl p Ar pps
specifies the target packets-per-second rate for
.Nm
to reach.  By default, this value is 20.
.It Fl M Ar monitorname
specifies the canonical name of machine where
.Nm
is run.  This value is used when recording the output in a
.Xr warts 5
output file.
.It Fl s Ar sport
specifies the default source port value for
.Nm
to use.  By default, this value is the least significant 15 bits of the
process id with the 16th bit set.
.It Fl H Ar holdtime
specifies how long to wait after a measurement has completed for any final
responses that were delayed.
.It Fl o Ar outfile
specifies the default output file to write measurement results to.  By
default, stdout is used.
.It Fl O Ar outtype
specifies the default output file format to use.  By default, ASCII output
is used.  However,
.Xr warts 5
provides a binary file format that records much more meta data and detail.
.It Fl i Ar addr 1..N
specifies the addresses to probe, on the command line.
.It Ar listfile
specifies the input file to read for target addresses.
.It Fl D Ar port
specifies that
.Nm
starts as a daemon, listening on the specified port.
.El
.\""""""""""""
.Sh TRACE OPTIONS
The following variation of the
.Xr traceroute 8
options are available when using the
.Nm
trace command:
.Pp
trace
.Bk -words
.Op Fl MQ
.Op Fl d Ar dport
.Op Fl f Ar firsthop
.Op Fl g Ar gaplimit
.Op Fl l Ar loops
.Op Fl m Ar maxttl
.Op Fl P Ar method
.Op Fl q Ar attempts
.Op Fl s Ar sport
.Op Fl t Ar tos
.Op Fl w Ar wait
.Ek
.Bl -tag -width Ds
.It Fl P Ar method
specifies the traceroute method to use.
.Nm
currently supports five different probe methods: UDP, ICMP, TCP, UDP-paris,
and ICMP-paris.  By default, UDP is used.
.It Fl d Ar dport
specifies the base destination port value to use for UDP-based and TCP-based
traceroute methods.  For ICMP-based methods, this option has no effect.
.It Fl s Ar sport
specifies the source port value to use.  For ICMP-based methods, this option
specifies the ICMP identifier to use.
.It Fl f Ar firsthop
specifies the TTL or HLIM value to begin probing with.  By default,
a first hop of one is used.
.It Fl g Ar gaplimit
specifies the number of unresponsive hops permitted until a check is made to
see if the destination will respond.  By default, a gap limit of 5 hops is
used.  Setting the gap limit to 0 disables the gap limit.
.It Fl m Ar maxttl
specifies the maximum TTL or HLIM value that will be probed.  By default,
a maxttl of 32 is used.
.It Fl l Ar loops
specifies the maximum number of loops permitted until probing stops.  By
default, a value of one is used.  A value of zero disables loop checking.
.It Fl q Ar attempts
specifies the maximum number of attempts to obtain a response per hop.  By
default, a value of two is used.
.It Fl Q
specifies that all allocated probes are sent, regardless of how many responses
have been received.
.It Fl w Ar wait
specifies how long to wait, in seconds, for a reply.  By default, a value
of 5 is used.
.It Fl t Ar tos
specifies the value to set in the IP ToS/DSCP + ECN byte.  By default, this
byte is set to zero.
.It Fl M
specifies that path MTU discovery should be attempted for the path when the
initial traceroute completes.
.El
.\""""""""""""
.Sh PING OPTIONS
The following variation of the
.Xr ping 8
options are available when using the
.Nm
ping command:
.Pp
ping
.Bk -words
.Op Fl c Ar probecount
.Op Fl i Ar wait
.Op Fl m Ar ttl
.Op Fl o Ar replycount
.Op Fl p Ar pattern
.Op Fl s Ar size
.Op Fl z Ar tos
.Ek
.Bl -tag -width Ds
.It Fl c Ar probecount
specifies the number of probes to send before exiting.  By default, a value
of 4 is used.
.It Fl i Ar wait
specifies the length of time to wait, in seconds, between probes.  By default,
a value of 1 is used.
.It Fl m Ar ttl
specifies the TTL value to use for outgoing packets.  By default, a value of
64 is used.
.It Fl o Ar replycount
specifies the number of replies required at which time probing may cease.  By
default, all probes are sent.
.It Fl p Ar pattern
specifies the pattern, in hex, to use in probes.  Up to 16 bytes may be
specified.  By default, each probe's bytes are zeroed.
.It Fl s Ar size
specifies the size of the probes to send.  The probe size includes the length
of the IP and ICMP headers.  By default, a probe size of 84 bytes is used for
IPv4 pings, and 56 bytes for IPv6 pings.
.It Fl z Ar tos
specifies the value to use in the IPv4 ToS/DSCP + ECN byte.  By default, this
byte is set to zero.
.El
.\""""""""""""
.Sh DATA COLLECTION FEATURES
.Nm
has two data output formats.
The first is a human-readable format suitable for one-off data collection and
measurement.
The second, known as
.Ic warts ,
is a binary format that records much more meta-data and is more precise than
the human-readable format.
.Pp
.Nm
is designed for Internet-scale measurement, where large lists of targets
are supplied for probing.
.Nm
has the ability to probe multiple lists simultaneously, with each having a
mix rate that specifies the priority of the list.
.Nm
can also make multiple cycles over a list of addresses.
.Pp
When writing output to a
.Ic warts
file,
.Nm
records details of the list and cycle that each measurement task belongs
to.
.\""""""""""""
.Sh CONTROL SOCKET
When started with the
.Fl D
option,
.Nm
allows inter-process communication via a TCP socket bound to the supplied
port on the local host.
This socket is useful for controlling the operation of a long-lived
.Nm
process.
A client may interact with scamper by using
.Xr telnet 1
to open a connection to the supplied port.
.Pp
The following control socket commands are available.
.Pp
.Bl -tag -width "   "
.It Ic exit
The exit command closes the current control socket connection.
.It Ic get Ar argument
The get command returns the current setting for the supplied argument.
Valid argument values are: holdtime, monitorname, pid, pps, sport, version.
.It Ic set Ar argument ...
The set command sets the current setting for the supplied argument.
Valid argument values are: holdtime, monitorname, pps.
.It Ic source Ar argument ...
.Bl -tag -width "   "
.It Ic add Ar arguments
The
.Ic source add
command allows a new input source to be added.
It accepts the following arguments:
.Bl -tag -width "   "
.It Ic name Ar string
The name of the source.  This parameter is mandatory.
.It Ic descr Ar string
An optional string describing the source.
.It Ic command Ar string
The command to execute for each address supplied.
If not supplied, the default command is used.
.It Ic list_id Ar uint32_t
An optional numeric list identifier, assigned by a human.
If not supplied, a value of zero is used.
.It Ic cycle_id Ar uint32_t
An optional numeric initial cycle identifier to use, assigned by a human.
If not supplied, a value of one is used.
.It Ic priority Ar uint32_t
An optional numeric value that specifies the mix rate of measurements from
the source compared to other sources.
If not supplied, a mix rate of one is used.
A value of zero causes the source to be created, but not actively used.
.It Ic adhoc Xo
.Op Cm on | off
.Xc
An optional parameter that specifies if the source is adhoc (on) or managed
(off).
An adhoc source is supplied addresses to probe using control socket commands.
A managed source is one that is supplied addresses to probe from a file.
A managed source handles cycling and reloading the file as necessary.
If not supplied, an adhoc source is created.
.It Ic outfile Ar string
The name of the output file to write results to, previously defined with
.Ic outfile open .
If not supplied, the default output file is used.
.It Ic file Ar string
The name of the input file to read target addresses from.
This parameter is mandatory if the source is a managed source.
.It Ic cycles Ar integer
The number of cycles to make over the target address file.
If zero,
.Nm
will loop indefinitely over the file.
This parameter is ignored unless a managed source is defined.
.It Ic autoreload Xo
.Op Cm on | off
.Xc
This parameter specifies if the target address file should be re-read whenever
a cycle is completed, or if the same set of target addresses as the previous
cycle should be used.
If not specified, the file is not automatically reloaded at cycle time.
.El
.It Ic update Ar name arguments
The
.Ic source update
command allows some properties of an existing source to be modified.
The source to update is specified with the
.Ar name
parameter.
Valid parameters are: autoreload, cycles, and priority.
.It Ic list Ar ...
The
.Ic source list
command provides a listing of all currently defined sources.
The optional third
.Ar name
parameter restricts the listing to the source specified.
.It Ic cycle Ar name
The
.Ic source cycle
command manually inserts a cycle marker in an adhoc source.
.It Ic delete Ar name
The
.Ic source delete
command deletes the named source, if possible.
.El
.It Ic outfile Ar argument ...
The outfile commands provide the ability to manage output files.
It accepts the following arguments:
.Bl -tag -width "   "
.It Ic open Ar ...
The
.Ic outfile open
command allows a new output file to be defined.
It accepts the following parameters:
.Bl -tag -width "   "
.It Ic name Ar alias
The alias of the output file.  This parameter is mandatory.
.It Ic file Ar string
The filename of the output file.  This parameter is mandatory.
.It Ic mode Xo
.Op Cm truncate | append
.Xc
How the file will be opened.
If the append mode is used, any existing file with the specified name will
be appended to.
If the truncate mode is used, any existing file will be truncated when it is
opened.
.El
.It Ic close Ar alias
The
.Ic outfile close
command allows an existing output file to be closed.
The mandatory
.Ar alias
parameter specifies which output file to close.
An output file that is currently referenced is not able to be closed.
To close a file that is currently referenced, a new outfile must be opened,
and then the
.Ic outfile swap
command be used.
.It Ic swap Ar alias1 alias2
The
.Ic outfile swap
command swaps the file associated with each output file.
.It Ic list
The
.Ic outfile list
command outputs a list of the existing outfiles.
.El
.It Ic observe sources
This command allows for monitoring of source events.
When executed, the control socket will then supply event notices
whenever a source is added, updated, deleted, finished, or cycled.
Each event is prefixed with a count of the number of seconds elapsed since
the Unix epoch.
The following examples illustrate the event monitoring capabilities:
.Pp
.Dl EVENT 1169065640 source add name 'foo' list_id 5 priority 1
.Dl EVENT 1169065641 source update 'foo' priority 15
.Dl EVENT 1169065642 source cycle 'bar' id 2
.Dl EVENT 1169065650 source finish 'bar'
.Dl EVENT 1169065661 source delete 'foo'
.It Ic shutdown Ar argument
The shutdown argument allows the
.Nm
process to be exited cleanly.  The following arguments are supported
.Bl -tag -width "   "
.It Ic done
The
.Ic shutdown done
command requests that
.Nm
shuts down when the current tasks, as well as all remaining cycles, have
completed.
.It Ic flush
The
.Ic shutdown flush
command requests that
.Nm
flushes all remaining tasks queued with each list, finishes all current
tasks, and then shuts down.
.It Ic now
The
.Ic shutdown now
command causes
.Nm
to shutdown immediately.
Unfinished tasks are purged.
.It Ic cancel
The
.Ic shutdown cancel
command cancels any pending shutdown.
.El
.El
.Sh EXAMPLES
To use the default traceroute command to trace the path to 192.168.1.1:
.Pp
.in +.5i
scamper -i 192.168.1.1
.in -.5i
.Pp
To infer Path MTU changes in the network and associate them with a traceroute
path:
.Pp
.in +.5i
scamper -c "trace -M" -i 192.168.1.1
.in -.5i
.Pp
To use paris UDP traceroute, using 3 probes per hop, sending all probes:
.Pp
.in +.5i
scamper -c "trace -P UDP-paris -q 3 -Q" -i 192.168.1.1
.in -.5i
.Pp
To ping a series of addresses defined in
.Ar filename ,
probing each address 10 times:
.Pp
.in +.5i
scamper -c "ping -c 10"
.Ar filename
.in -.5i
.Sh SEE ALSO
.Xr ping 8 ,
.Xr sc_analysis_dump 1 ,
.Xr traceroute 8 ,
.Xr warts 5 ,
.Xr warts-dump 1
.\""""""""""""
.Sh AUTHOR
.Nm
is written by Matthew Luckie <mjl@wand.net.nz>, member of the WAND network
research group at the University of Waikato.
.\""""""""""""
.Sh ACKNOWLEDGEMENTS
.Nm
development was initially funded by the WIDE project in association with
CAIDA.  CAIDA actively support
.Nm
development.