diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2011-03-16 08:06:11 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2011-03-16 08:06:11 +0000 |
commit | 45747250cdcd2f5aa85b1002441d966b460957aa (patch) | |
tree | 25c9cf51d95e571fdc98bd5583193506f6ca6d62 /usr.bin/tcpbench | |
parent | b96b9773cdefa1c43255146055d177da5925d6e1 (diff) |
various cleanup;
Diffstat (limited to 'usr.bin/tcpbench')
-rw-r--r-- | usr.bin/tcpbench/tcpbench.1 | 42 | ||||
-rw-r--r-- | usr.bin/tcpbench/tcpbench.c | 8 |
2 files changed, 26 insertions, 24 deletions
diff --git a/usr.bin/tcpbench/tcpbench.1 b/usr.bin/tcpbench/tcpbench.1 index f7869098acf..df0e8ebb89f 100644 --- a/usr.bin/tcpbench/tcpbench.1 +++ b/usr.bin/tcpbench/tcpbench.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tcpbench.1,v 1.11 2011/03/09 18:13:18 claudio Exp $ +.\" $OpenBSD: tcpbench.1,v 1.12 2011/03/16 08:06:10 jmc Exp $ .\" .\" Copyright (c) 2008 Damien Miller <djm@mindrot.org> .\" @@ -14,18 +14,17 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 9 2011 $ +.Dd $Mdocdate: March 16 2011 $ .Dt TCPBENCH 1 .Os .Sh NAME .Nm tcpbench -.Nd TCP and UDP benchmarking and measurement tool +.Nd TCP/UDP benchmarking and measurement tool .Sh SYNOPSIS .Nm .Fl l .Nm -.Op Fl v -.Op Fl u +.Op Fl uv .Op Fl B Ar buf .Op Fl k Ar kvars .Op Fl n Ar connections @@ -37,8 +36,7 @@ .Nm .Bk -words .Fl s -.Op Fl v -.Op Fl u +.Op Fl uv .Op Fl B Ar buf .Op Fl k Ar kvars .Op Fl p Ar port @@ -77,40 +75,43 @@ The options are as follows: Specify the size of the internal read/write buffer used by .Nm . The default is 262144 bytes for TCP client/server and UDP server. - -In UDP client mode, this may be used to specify the packet size on the test +In UDP client mode this may be used to specify the packet size on the test stream. .It Fl k Ar kvars Specify one or more kernel variables to monitor; multiple variables must be -separated with commas. This option is only valid in TCP mode. +separated with commas. +This option is only valid in TCP mode. The default is not to monitor any variables. Using this option requires read access to .Pa /dev/kmem . .It Fl l List the name of kernel variables available for monitoring and exit. .It Fl n Ar connections -Use the given number of TCP connections (default: 1). UDP is connectionless so -this option isn't valid. +Use the given number of TCP connections (default: 1). +UDP is connectionless so this option isn't valid. .It Fl p Ar port -Specify the port used for the TCP or UDP test stream (default: 12345). +Specify the port used for the test stream (default: 12345). .It Fl r Ar interval Specify the statistics interval reporting rate in milliseconds (default: 1000). .It Fl S Ar space -Set the size of the socket buffer used for the TCP or UDP test stream. +Set the size of the socket buffer used for the test stream. On the client this option will resize the send buffer; on the server it will resize the receive buffer. .It Fl s Place .Nm in server mode, where it will listen on all interfaces for incoming -connections. Defaults to TCP if +connections. +It defaults to using TCP if .Fl u -not specified. +is not specified. .It Fl u -Use UDP instead of TCP, this must be specified on both client and -server. Transmitted packets per second (TX PPS) will be accounted on the client +Use UDP instead of TCP; this must be specified on both the client +and the server. +Transmitted packets per second (TX PPS) will be accounted on the client side, while received packets per second (RX PPS) whill be accounted on the -server side. UDP has no Protocol Control Block (PCB) so the +server side. +UDP has no Protocol Control Block (PCB) so the .Fl k flags don't apply. .It Fl V Ar rtable @@ -129,10 +130,11 @@ The program first appeared in .Ox 4.4 . .Sh AUTHORS +.An -nosplit The .Nm program was written by .An Damien Miller Aq djm@openbsd.org . - +.Pp UDP mode and libevent port by .An Christiano F. Haesbaert Aq haesbaert@haesbaert.org . diff --git a/usr.bin/tcpbench/tcpbench.c b/usr.bin/tcpbench/tcpbench.c index aefea2053fc..aac03e22df3 100644 --- a/usr.bin/tcpbench/tcpbench.c +++ b/usr.bin/tcpbench/tcpbench.c @@ -172,10 +172,10 @@ usage(void) { fprintf(stderr, "usage: tcpbench -l\n" - " tcpbench [-v] [-u] [-B buf] [-k kvars] [-n connections]\n" - " [-p port] [-q] [-r rate] [-S space] [-V rtable] hostname\n" - " tcpbench -s [-v] [-u] [-B buf] [-k kvars] [-p port]\n" - " [-q] [-r rate] [-S space] [-V rtable]\n"); + " tcpbench [-uv] [-B buf] [-k kvars] [-n connections] [-p port]\n" + " [-r interval] [-S space] [-V rtable] hostname\n" + " tcpbench -s [-uv] [-B buf] [-k kvars] [-p port]\n" + " [-r interval] [-S space] [-V rtable]\n"); exit(1); } |