[BACK]Return to tcpbench.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / tcpbench

Annotation of src/usr.bin/tcpbench/tcpbench.1, Revision 1.12

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