Annotation of src/usr.bin/tcpbench/tcpbench.1, Revision 1.15
1.15 ! haesbaer 1: .\" $OpenBSD: tcpbench.1,v 1.14 2011/08/23 07:02:34 jmc 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.15 ! haesbaer 29: .Op Fl b Ar addr
1.1 djm 30: .Op Fl k Ar kvars
1.3 henning 31: .Op Fl n Ar connections
1.1 djm 32: .Op Fl p Ar port
1.11 claudio 33: .Op Fl r Ar interval
1.1 djm 34: .Op Fl S Ar space
1.13 haesbaer 35: .Op Fl T Ar toskeyword
1.8 guenther 36: .Op Fl V Ar rtable
1.1 djm 37: .Ar hostname
38: .Nm
1.7 jmc 39: .Bk -words
1.1 djm 40: .Fl s
1.12 jmc 41: .Op Fl uv
1.2 jmc 42: .Op Fl B Ar buf
1.1 djm 43: .Op Fl k Ar kvars
44: .Op Fl p Ar port
1.11 claudio 45: .Op Fl r Ar interval
1.14 jmc 46: .Op Fl S Ar space
1.13 haesbaer 47: .Op Fl T Ar toskeyword
1.8 guenther 48: .Op Fl V Ar rtable
1.7 jmc 49: .Ek
1.1 djm 50: .Sh DESCRIPTION
51: .Nm
52: is a small tool that performs throughput benchmarking and concurrent
53: sampling of kernel network variables.
54: .Pp
55: .Nm
56: is run as a client/server pair.
57: The server must be invoked with the
58: .Fl s
59: flag, which will cause it to listen for incoming connections.
60: The client must be invoked with the
61: .Ar hostname
62: of a listening server to connect to.
63: .Pp
1.11 claudio 64: Once connected, the client will send TCP or UDP traffic as fast as possible to
1.1 djm 65: the server.
66: Both the client and server will periodically display throughput
67: statistics along with any kernel variables the user has selected to
68: sample (using the
69: .Fl k
1.11 claudio 70: option, which is only available in TCP mode).
1.1 djm 71: A list of available kernel variables may be obtained using the
72: .Fl l
73: option.
74: .Pp
75: The options are as follows:
76: .Bl -tag -width Ds
1.2 jmc 77: .It Fl B Ar buf
1.5 jmc 78: Specify the size of the internal read/write buffer used by
1.1 djm 79: .Nm .
1.11 claudio 80: The default is 262144 bytes for TCP client/server and UDP server.
1.12 jmc 81: In UDP client mode this may be used to specify the packet size on the test
1.11 claudio 82: stream.
1.15 ! haesbaer 83: .It Fl b Ar addr
! 84: Specifies the IP address of the interface which is used to send the packets.
1.1 djm 85: .It Fl k Ar kvars
1.2 jmc 86: Specify one or more kernel variables to monitor; multiple variables must be
1.12 jmc 87: separated with commas.
88: This option is only valid in TCP mode.
1.1 djm 89: The default is not to monitor any variables.
1.5 jmc 90: Using this option requires read access to
91: .Pa /dev/kmem .
1.2 jmc 92: .It Fl l
93: List the name of kernel variables available for monitoring and exit.
1.3 henning 94: .It Fl n Ar connections
1.12 jmc 95: Use the given number of TCP connections (default: 1).
96: UDP is connectionless so this option isn't valid.
1.1 djm 97: .It Fl p Ar port
1.12 jmc 98: Specify the port used for the test stream (default: 12345).
1.11 claudio 99: .It Fl r Ar interval
100: Specify the statistics interval reporting rate in milliseconds (default: 1000).
1.2 jmc 101: .It Fl S Ar space
1.12 jmc 102: Set the size of the socket buffer used for the test stream.
1.2 jmc 103: On the client this option will resize the send buffer;
104: on the server it will resize the receive buffer.
1.1 djm 105: .It Fl s
106: Place
107: .Nm
108: in server mode, where it will listen on all interfaces for incoming
1.12 jmc 109: connections.
110: It defaults to using TCP if
1.11 claudio 111: .Fl u
1.12 jmc 112: is not specified.
1.13 haesbaer 113: .It Fl T Ar toskeyword
114: Change the IPv4 TOS or IPv6 TCLASS value.
115: .Ar toskeyword
116: may be one of
117: .Ar critical ,
118: .Ar inetcontrol ,
119: .Ar lowdelay ,
120: .Ar netcontrol ,
121: .Ar throughput ,
122: .Ar reliability ,
123: or one of the DiffServ Code Points:
124: .Ar ef ,
125: .Ar af11 ... af43 ,
126: .Ar cs0 ... cs7 ;
127: or a number in either hex or decimal.
1.11 claudio 128: .It Fl u
1.12 jmc 129: Use UDP instead of TCP; this must be specified on both the client
130: and the server.
131: Transmitted packets per second (TX PPS) will be accounted on the client
1.11 claudio 132: side, while received packets per second (RX PPS) whill be accounted on the
1.12 jmc 133: server side.
134: UDP has no Protocol Control Block (PCB) so the
1.11 claudio 135: .Fl k
136: flags don't apply.
1.8 guenther 137: .It Fl V Ar rtable
138: Set the routing table to be used.
1.6 claudio 139: The default is 0.
1.1 djm 140: .It Fl v
141: Display verbose output.
142: If specified more than once, increase the detail of information displayed.
143: .El
144: .Sh SEE ALSO
1.2 jmc 145: .Xr netstat 1 ,
1.1 djm 146: .Xr pstat 8
1.10 fkr 147: .Sh HISTORY
148: The
149: .Nm
150: program first appeared in
151: .Ox 4.4 .
152: .Sh AUTHORS
1.12 jmc 153: .An -nosplit
1.10 fkr 154: The
155: .Nm
156: program was written by
157: .An Damien Miller Aq djm@openbsd.org .
1.12 jmc 158: .Pp
1.11 claudio 159: UDP mode and libevent port by
160: .An Christiano F. Haesbaert Aq haesbaert@haesbaert.org .