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