]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - tools/tools/mctest/mctest.1
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / tools / tools / mctest / mctest.1
1 .\" Copyright (c) 2008 George V. Neville-Neil
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd April 3, 2008
28 .Dt MCTEST 1
29 .Os
30 .Sh NAME
31 .Nm mctest
32 .Nd "multicast test"
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl i Ar interface
36 .Op Fl g Ar group
37 .Op Fl b Ar base port
38 .Op Fl n Ar number
39 .Op Fl s Ar size
40 .Op Fl t Ar inter-packet gap
41 .Op Fl M Ar number of clients (source only)
42 .Op Fl m Ar my client number (sink only)
43 .Op Fl r
44 .Sh DESCRIPTION
45 The
46 .Nm
47 command implements a multicast test which involves a source
48 and a sink.
49 The source sends packets to a pre-configured
50 multicast address over the interface given as a command line
51 argument.
52 The sink listens for multicast packets, records
53 the time at which they are received and then reflects them back
54 over unicast to the source.
55 When the source has captured all
56 the reflected packets it prints out the round trip time of each.
57 .Pp
58 The source prints out the round trip time of packets sent to the
59 sinks.
60 The sink prints out the time between the packets received.
61 .Pp
62 The options are as follows:
63 .Bl -tag -width ".Fl i Ar interface"
64 .It Fl i Ar interface
65 Network interface, which can be found with
66 .Xr ifconfig 8 .
67 .It Fl g Ar group
68 Multicast group.
69 .It Fl b Ar base port
70 Port on which to listen.
71 .It Fl s Ar size
72 Packet size in bytes.
73 .It Fl n Ar number
74 Number of packets.
75 .It Fl t Ar gap
76 Inter-packet gap in nanoseconds.
77 .It Fl M Ar clients
78 The number of clients that are listening.
79 .It Fl m Ar my number
80 The client's number 0, 1, etc.
81 .It Fl r
82 This version of
83 .Nm
84 is the receiver aka the sink.
85 This option MUST
86 only be used with one copy of the program at a time.
87 .El
88 .Sh EXAMPLES
89 The following is an example of a typical usage
90 of the
91 .Nm
92 command:
93 .Pp
94 Source
95 .Dl "mctest -i em0 -M 1 -s 1024 -n 100 -t 1"
96 Sink
97 .Dl "mctest -i em0 -m 0 -s 1024 -n 100 -r"
98 .Pp
99 Send 100 packets of 1024 bytes, with an inter-packet gap of 1 nanosecond.
100 .Pp
101 Gaps are measured with
102 .Xr nanosleep 2 ,
103 and so are not accurate down to nanoseconds
104 but depend on the setting of
105 .Va kern.hz .
106 .Sh SEE ALSO
107 .Xr netstat 1 ,
108 .Xr nanosleep 2 ,
109 .Xr ifconfig 8
110 .Sh HISTORY
111 The
112 .Nm
113 program first appeared in
114 .Fx 7.0 .
115 .Sh AUTHORS
116 This
117 manual page was written by
118 .An George V. Neville-Neil Aq gnn@FreeBSD.org .
119 .Sh BUGS
120 Should be reported to the author or to
121 .Aq net@FreeBSD.org .