Annotation of src/usr.bin/tcpbench/tcpbench.1, Revision 1.14
1.14 ! jmc 1: .\" $OpenBSD: tcpbench.1,v 1.13 2011/08/23 04:13:37 haesbaert Exp $
1.1 djm 2: .\"
3: .\" Copyright (c) 2008 Damien Miller <djm@mindrot.org>
4: .\"
5: .\" Permission to use, copy, modify, and distribute this software for any
6: .\" purpose with or without fee is hereby granted, provided that the above
7: .\" copyright notice and this permission notice appear in all copies.
8: .\"
9: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16: .\"
1.14 ! jmc 17: .Dd $Mdocdate: August 23 2011 $
1.9 jmc 18: .Dt TCPBENCH 1
1.1 djm 19: .Os
20: .Sh NAME
21: .Nm tcpbench
1.12 jmc 22: .Nd TCP/UDP benchmarking and measurement tool
1.1 djm 23: .Sh SYNOPSIS
24: .Nm
25: .Fl l
26: .Nm
1.12 jmc 27: .Op Fl uv
1.2 jmc 28: .Op Fl B Ar buf
1.1 djm 29: .Op Fl k Ar kvars
1.3 henning 30: .Op Fl n Ar connections
1.1 djm 31: .Op Fl p Ar port
1.11 claudio 32: .Op Fl r Ar interval
1.1 djm 33: .Op Fl S Ar space
1.13 haesbaer 34: .Op Fl T Ar toskeyword
1.8 guenther 35: .Op Fl V Ar rtable
1.1 djm 36: .Ar hostname
37: .Nm
1.7 jmc 38: .Bk -words
1.1 djm 39: .Fl s
1.12 jmc 40: .Op Fl uv
1.2 jmc 41: .Op Fl B Ar buf
1.1 djm 42: .Op Fl k Ar kvars
43: .Op Fl p Ar port
1.11 claudio 44: .Op Fl r Ar interval
1.14 ! jmc 45: .Op Fl S Ar space
1.13 haesbaer 46: .Op Fl T Ar toskeyword
1.8 guenther 47: .Op Fl V Ar rtable
1.7 jmc 48: .Ek
1.1 djm 49: .Sh DESCRIPTION
50: .Nm
51: is a small tool that performs throughput benchmarking and concurrent
52: sampling of kernel network variables.
53: .Pp
54: .Nm
55: is run as a client/server pair.
56: The server must be invoked with the
57: .Fl s
58: flag, which will cause it to listen for incoming connections.
59: The client must be invoked with the
60: .Ar hostname
61: of a listening server to connect to.
62: .Pp
1.11 claudio 63: Once connected, the client will send TCP or UDP traffic as fast as possible to
1.1 djm 64: the server.
65: Both the client and server will periodically display throughput
66: statistics along with any kernel variables the user has selected to
67: sample (using the
68: .Fl k
1.11 claudio 69: option, which is only available in TCP mode).
1.1 djm 70: A list of available kernel variables may be obtained using the
71: .Fl l
72: option.
73: .Pp
74: The options are as follows:
75: .Bl -tag -width Ds
1.2 jmc 76: .It Fl B Ar buf
1.5 jmc 77: Specify the size of the internal read/write buffer used by
1.1 djm 78: .Nm .
1.11 claudio 79: The default is 262144 bytes for TCP client/server and UDP server.
1.12 jmc 80: In UDP client mode this may be used to specify the packet size on the test
1.11 claudio 81: stream.
1.1 djm 82: .It Fl k Ar kvars
1.2 jmc 83: Specify one or more kernel variables to monitor; multiple variables must be
1.12 jmc 84: separated with commas.
85: This option is only valid in TCP mode.
1.1 djm 86: The default is not to monitor any variables.
1.5 jmc 87: Using this option requires read access to
88: .Pa /dev/kmem .
1.2 jmc 89: .It Fl l
90: List the name of kernel variables available for monitoring and exit.
1.3 henning 91: .It Fl n Ar connections
1.12 jmc 92: Use the given number of TCP connections (default: 1).
93: UDP is connectionless so this option isn't valid.
1.1 djm 94: .It Fl p Ar port
1.12 jmc 95: Specify the port used for the test stream (default: 12345).
1.11 claudio 96: .It Fl r Ar interval
97: Specify the statistics interval reporting rate in milliseconds (default: 1000).
1.2 jmc 98: .It Fl S Ar space
1.12 jmc 99: Set the size of the socket buffer used for the test stream.
1.2 jmc 100: On the client this option will resize the send buffer;
101: on the server it will resize the receive buffer.
1.1 djm 102: .It Fl s
103: Place
104: .Nm
105: in server mode, where it will listen on all interfaces for incoming
1.12 jmc 106: connections.
107: It defaults to using TCP if
1.11 claudio 108: .Fl u
1.12 jmc 109: is not specified.
1.13 haesbaer 110: .It Fl T Ar toskeyword
111: Change the IPv4 TOS or IPv6 TCLASS value.
112: .Ar toskeyword
113: may be one of
114: .Ar critical ,
115: .Ar inetcontrol ,
116: .Ar lowdelay ,
117: .Ar netcontrol ,
118: .Ar throughput ,
119: .Ar reliability ,
120: or one of the DiffServ Code Points:
121: .Ar ef ,
122: .Ar af11 ... af43 ,
123: .Ar cs0 ... cs7 ;
124: or a number in either hex or decimal.
1.11 claudio 125: .It Fl u
1.12 jmc 126: Use UDP instead of TCP; this must be specified on both the client
127: and the server.
128: Transmitted packets per second (TX PPS) will be accounted on the client
1.11 claudio 129: side, while received packets per second (RX PPS) whill be accounted on the
1.12 jmc 130: server side.
131: UDP has no Protocol Control Block (PCB) so the
1.11 claudio 132: .Fl k
133: flags don't apply.
1.8 guenther 134: .It Fl V Ar rtable
135: Set the routing table to be used.
1.6 claudio 136: The default is 0.
1.1 djm 137: .It Fl v
138: Display verbose output.
139: If specified more than once, increase the detail of information displayed.
140: .El
141: .Sh SEE ALSO
1.2 jmc 142: .Xr netstat 1 ,
1.1 djm 143: .Xr pstat 8
1.10 fkr 144: .Sh HISTORY
145: The
146: .Nm
147: program first appeared in
148: .Ox 4.4 .
149: .Sh AUTHORS
1.12 jmc 150: .An -nosplit
1.10 fkr 151: The
152: .Nm
153: program was written by
154: .An Damien Miller Aq djm@openbsd.org .
1.12 jmc 155: .Pp
1.11 claudio 156: UDP mode and libevent port by
157: .An Christiano F. Haesbaert Aq haesbaert@haesbaert.org .