[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.17

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