From 63a31055fde751ba1361b72bdac0fd245802652a Mon Sep 17 00:00:00 2001 From: Jason McIntyre Date: Thu, 26 Jun 2008 07:05:57 +0000 Subject: some minor improvements from Pierre Riteau; ok djm --- usr.bin/tcpbench/Makefile | 1 - usr.bin/tcpbench/tcpbench.1 | 9 ++++++--- usr.bin/tcpbench/tcpbench.c | 25 ++++++------------------- 3 files changed, 12 insertions(+), 23 deletions(-) (limited to 'usr.bin/tcpbench') diff --git a/usr.bin/tcpbench/Makefile b/usr.bin/tcpbench/Makefile index 5e6acea0f46..63371663c11 100644 --- a/usr.bin/tcpbench/Makefile +++ b/usr.bin/tcpbench/Makefile @@ -21,4 +21,3 @@ LDADD=-lkvm #BINMODE=2555 .include - diff --git a/usr.bin/tcpbench/tcpbench.1 b/usr.bin/tcpbench/tcpbench.1 index f2a68ddd483..50a9b6277cc 100644 --- a/usr.bin/tcpbench/tcpbench.1 +++ b/usr.bin/tcpbench/tcpbench.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tcpbench.1,v 1.4 2008/06/12 23:00:51 jmc Exp $ +.\" $OpenBSD: tcpbench.1,v 1.5 2008/06/26 07:05:56 jmc Exp $ .\" .\" Copyright (c) 2008 Damien Miller .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 12 2008 $ +.Dd $Mdocdate: June 26 2008 $ .Os .Dt TCPBENCH 1 .Sh NAME @@ -68,12 +68,15 @@ option. The options are as follows: .Bl -tag -width Ds .It Fl B Ar buf -Specify the size of the internal write buffer used by +Specify the size of the internal read/write buffer used by .Nm . +The default is 262144 bytes. .It Fl k Ar kvars Specify one or more kernel variables to monitor; multiple variables must be separated with commas. 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 diff --git a/usr.bin/tcpbench/tcpbench.c b/usr.bin/tcpbench/tcpbench.c index ccd76896cac..10709ef1d14 100644 --- a/usr.bin/tcpbench/tcpbench.c +++ b/usr.bin/tcpbench/tcpbench.c @@ -111,25 +111,12 @@ static void __dead usage(void) { fprintf(stderr, -"Usage:\n" -" tcpbench -l\n" -" tcpbench [-v] [-p port] [-r rate] [host]\n" -" tcpbench [-v] [-p port] [-r rate] -s\n" -"Options:\n" -" -B buf Set read/write buffer space (default: %u)\n" -" -h Display this help\n" -" -k var[,var] List of kernel PCB, TCB and socket variables to display\n" -" (requires read access to /dev/kmem)\n" -" -l List kernel vars and exit\n" -" -n number use given numer of tcp connections (default: 1)\n" -" -p port Specify port (default: %s)\n" -" -s Server mode - listen for connections\n" -" (default: client mode - initiate connection)\n" -" -r rate Statistics display interval in milliseconds, or 0 to\n" -" disable (default: %d)\n" -" -S space Set socket send/receive space (default: kernel default)\n" -" -v Increase verbosity\n", - DEFAULT_BUF, DEFAULT_PORT, DEFAULT_STATS_INTERVAL); + "usage: tcpbench -l\n" + " tcpbench [-v] [-B buf] [-k kvars] [-n connections]" + " [-p port] [-r rate]\n" + " [-S space] hostname\n" + " tcpbench -s [-v] [-B buf] [-k kvars] [-p port] [-r rate]" + " [-S space]\n"); exit(1); } -- cgit v1.2.3