xref: /openbsd/usr.bin/tcpbench/tcpbench.1 (revision 404b540a)
1.\" $OpenBSD: tcpbench.1,v 1.7 2009/08/13 17:38:28 jmc Exp $
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.\"
17.Dd $Mdocdate: August 13 2009 $
18.Os
19.Dt TCPBENCH 1
20.Sh NAME
21.Nm tcpbench
22.Nd TCP benchmarking and measurement tool
23.Sh SYNOPSIS
24.Nm
25.Fl l
26.Nm
27.Op Fl v
28.Op Fl B Ar buf
29.Op Fl k Ar kvars
30.Op Fl n Ar connections
31.Op Fl p Ar port
32.Op Fl r Ar rate
33.Op Fl S Ar space
34.Op Fl V Ar rdomain
35.Ar hostname
36.Nm
37.Bk -words
38.Fl s
39.Op Fl v
40.Op Fl B Ar buf
41.Op Fl k Ar kvars
42.Op Fl p Ar port
43.Op Fl r Ar rate
44.Op Fl S Ar space
45.Op Fl V Ar rdomain
46.Ek
47.Sh DESCRIPTION
48.Nm
49is a small tool that performs throughput benchmarking and concurrent
50sampling of kernel network variables.
51.Pp
52.Nm
53is run as a client/server pair.
54The server must be invoked with the
55.Fl s
56flag, which will cause it to listen for incoming connections.
57The client must be invoked with the
58.Ar hostname
59of a listening server to connect to.
60.Pp
61Once connected, the client will send TCP traffic as fast as possible to
62the server.
63Both the client and server will periodically display throughput
64statistics along with any kernel variables the user has selected to
65sample (using the
66.Fl k
67option).
68A list of available kernel variables may be obtained using the
69.Fl l
70option.
71.Pp
72The options are as follows:
73.Bl -tag -width Ds
74.It Fl B Ar buf
75Specify the size of the internal read/write buffer used by
76.Nm .
77The default is 262144 bytes.
78.It Fl k Ar kvars
79Specify one or more kernel variables to monitor; multiple variables must be
80separated with commas.
81The default is not to monitor any variables.
82Using this option requires read access to
83.Pa /dev/kmem .
84.It Fl l
85List the name of kernel variables available for monitoring and exit.
86.It Fl n Ar connections
87Use the given number of TCP connections (default: 1).
88.It Fl p Ar port
89Specify the port used for the TCP test stream (default: 12345).
90.It Fl r Ar rate
91Specify the statistics reporting rate in milliseconds (default: 1000).
92.It Fl S Ar space
93Set the size of the socket buffer used for the TCP test stream.
94On the client this option will resize the send buffer;
95on the server it will resize the receive buffer.
96.It Fl s
97Place
98.Nm
99in server mode, where it will listen on all interfaces for incoming
100connections.
101.It Fl V Ar rdomain
102Set the routing domain.
103The default is 0.
104.It Fl v
105Display verbose output.
106If specified more than once, increase the detail of information displayed.
107.El
108.Sh SEE ALSO
109.Xr netstat 1 ,
110.Xr pstat 8
111