1
1

worked in Claus Klein's help string patches

removed silly #error from the congestion patch
preliminary manpage (!)
bumped version number to 2.0.4
changed email address to iperf-users@lists.sourceforge.net
removed duplicate help strings
Этот коммит содержится в:
Jon Dugan 2008-04-02 08:25:36 +00:00
родитель 9889143ebe
Коммит 1e12002c82
6 изменённых файлов: 164 добавлений и 70 удалений

Просмотреть файл

@ -63,12 +63,8 @@ extern "C" {
extern const char usage_short[];
#ifdef WIN32
extern const char usage_long1[];
extern const char usage_long2[];
#else
extern const char usage_long[];
#endif
extern const char version[];

Просмотреть файл

@ -1,2 +1,2 @@
#define IPERF_VERSION "2.0.3"
#define IPERF_VERSION_DATE "18 Mar 2008"
#define IPERF_VERSION "2.0.4"
#define IPERF_VERSION_DATE "4 Apr 2008"

148
man/iperf.1 Обычный файл
Просмотреть файл

@ -0,0 +1,148 @@
.TH IPERF 1 "APRIL 2008" NLANR/DAST "User Manuals"
.SH NAME
iperf \- perform network throughput tests
.SH SYNOPSIS
.B iperf -s [
.I options
.B ]
.B iperf -c
.I server
.B [
.I options
.B ]
.B iperf -u -s [
.I options
.B ]
.B iperf -u -c
.I server
.B [
.I options
.B ]
.SH DESCRIPTION
iperf is a tool for performing network throughput measurements. It can test
either TCP or UDP throughput. To perform an iperf test the user must
establish both a server (to discard traffic) and a client (to generate
traffic).
.SH "GENERAL OPTIONS"
.TP
.BR -f ", " --format " "
[kmKM] format to report: Kbits, Mbits, KBytes, MBytes
.TP
.BR -h ", " --help " "
print a help synopsis
.TP
.BR -i ", " --interval " \fIn\fR"
pause \fIn\fR seconds between periodic bandwidth reports
.TP
.BR -l ", " --len " \fIn\fR[KM]"
set length read/write buffer to \fIn\fR (default 8 KB)
.TP
.BR -m ", " --print_mss " "
print TCP maximum segment size (MTU - TCP/IP header)
.TP
.BR -o ", " --output " <filename>"
output the report or error message to this specified file
.TP
.BR -p ", " --port " \fIn\fR"
set server port to listen on/connect to to \fIn\fR (default 5001)
.TP
.BR -u ", " --udp " "
use UDP rather than TCP
.TP
.BR -w ", " --window " \fIn\fR[KM]"
TCP window size (socket buffer size)
.TP
.BR -B ", " --bind " <host>"
bind to <host>, an interface or multicast address
.TP
.BR -C ", " --compatibility " "
for use with older versions does not sent extra msgs
.TP
.BR -M ", " --mss " \fIn\fR"
set TCP maximum segment size (MTU - 40 bytes)
.TP
.BR -N ", " --nodelay " "
set TCP no delay, disabling Nagle's Algorithm
.TP
.BR -v ", " --version " "
print version information and quit
.TP
.BR -V ", " --IPv6Version " "
Set the domain to IPv6
.TP
.BR -x ", " --reportexclude " "
[CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports
.TP
.BR -y ", " --reportstyle " C|c"
if set to C or c report results as CSV (comma separated values)
.SH "SERVER SPECIFIC OPTIONS"
.TP
.BR -s ", " --server " "
run in server mode
.TP
.BR -U ", " --single_udp " "
run in single threaded UDP mode
.TP
.BR -D ", " --daemon " "
run the server as a daemon
.SH "CLIENT SPECIFIC OPTIONS"
.TP
.BR -b ", " --bandwidth " \fIn\fR[KM]"
set target bandwidth to \fIn\fR bits/sec (default 1 Mbit/sec).
This setting requires UDP (-u).
.TP
.BR -c ", " --client " <host>"
run in client mode, connecting to <host>
.TP
.BR -d ", " --dualtest " "
Do a bidirectional test simultaneously
.TP
.BR -n ", " --num " \fIn\fR[KM]"
number of bytes to transmit (instead of -t)
.TP
.BR -r ", " --tradeoff " "
Do a bidirectional test individually
.TP
.BR -t ", " --time " \fIn\fR"
time in seconds to transmit for (default 10 secs)
.TP
.BR -F ", " --fileinput " <name>"
input the data to be transmitted from a file
.TP
.BR -I ", " --stdin " "
input the data to be transmitted from stdin
.TP
.BR -L ", " --listenport " \fIn\fR"
port to recieve bidirectional tests back on
.TP
.BR -P ", " --parallel " \fIn\fR"
number of parallel client threads to run
.TP
.BR -T ", " --ttl " \fIn\fR"
time-to-live, for multicast (default 1)
.TP
.BR -Z ", " --linux-congestion " <algo>"
set TCP congestion control algorithm (Linux only)
.SH ENVIRONMENT
.TP
.BR TCP_WINDOW_SIZE
Controls the size of TCP buffers.
.SH DIAGNOSTICS
This section needs to be filled in.
.SH BUGS
Exit statuses are inconsistent.
The threading implementation is rather heinous.
.SH AUTHORS
Iperf was originally written by Mark Gates and Alex Warshavsky.
Man page and maintence by Jon Dugan <jdugan at x1024 dot net>.
Other contributions from Ajay Tirumala, Jim Ferguson,
Feng Qin,
Kevin Gibbs,
John Estabrook <jestabro at ncsa.uiuc.edu>,
Andrew Gallatin <gallatin at gmail.com>,
Stephen Hemminger <shemminger at linux-foundation.org>
.SH "SEE ALSO"
http://iperf.sourceforge.net/

Просмотреть файл

@ -71,7 +71,6 @@ const char usage_short[] = "\
Usage: %s [-s|-c host] [options]\n\
Try `%s --help' for more information.\n";
#ifdef WIN32
const char usage_long1[] = "\
Usage: iperf [-s|-c host] [options]\n\
iperf [-h|--help] [-v|--version]\n\
@ -94,8 +93,11 @@ Client/Server:\n\
Server specific:\n\
-s, --server run in server mode\n\
-U, --single_udp run in single threaded UDP mode\n\
-D, --daemon run the server as a daemon\n\
-R, --remove remove service in win32\n";
-D, --daemon run the server as a daemon\n"
#ifdef WIN32
" -R, --remove remove service in win32\n"
#endif
;
const char usage_long2[] = "\
\n\
@ -112,8 +114,11 @@ Client specific:\n\
-L, --listenport # port to recieve bidirectional tests back on\n\
-P, --parallel # number of parallel client threads to run\n\
-T, --ttl # time-to-live, for multicast (default 1)\n\
-Z, --linux-congestion <algo> set TCP congestion control algorithm (Linux only)\n\
\n\
Miscellaneous:\n\
-x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports\n\
-y, --reportstyle C report as a Comma-Separated Values\n\
-h, --help print this message and quit\n\
-v, --version print version information and quit\n\
\n\
@ -123,59 +128,7 @@ The TCP window size option can be set by the environment variable\n\
TCP_WINDOW_SIZE. Most other options can be set by an environment variable\n\
IPERF_<long option name>, such as IPERF_BANDWIDTH.\n\
\n\
Report bugs to <dast@nlanr.net>\n";
#else
const char usage_long[] = "\
Usage: iperf [-s|-c host] [options]\n\
iperf [-h|--help] [-v|--version]\n\
\n\
Client/Server:\n\
-f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes\n\
-i, --interval # seconds between periodic bandwidth reports\n\
-l, --len #[KM] length of buffer to read or write (default 8 KB)\n\
-m, --print_mss print TCP maximum segment size (MTU - TCP/IP header)\n\
-p, --port # server port to listen on/connect to\n\
-u, --udp use UDP rather than TCP\n\
-w, --window #[KM] TCP window size (socket buffer size)\n\
-B, --bind <host> bind to <host>, an interface or multicast address\n\
-C, --compatibility for use with older versions does not sent extra msgs\n\
-M, --mss # set TCP maximum segment size (MTU - 40 bytes)\n\
-N, --nodelay set TCP no delay, disabling Nagle's Algorithm\n\
-V, --IPv6Version Set the domain to IPv6\n\
\n\
Server specific:\n\
-s, --server run in server mode\n\
-U, --single_udp run in single threaded UDP mode\n\
-D, --daemon run the server as a daemon\n\
\n\
Client specific:\n\
-b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec\n\
(default 1 Mbit/sec, implies -u)\n\
-c, --client <host> run in client mode, connecting to <host>\n\
-d, --dualtest Do a bidirectional test simultaneously\n\
-n, --num #[KM] number of bytes to transmit (instead of -t)\n\
-r, --tradeoff Do a bidirectional test individually\n\
-t, --time # time in seconds to transmit for (default 10 secs)\n\
-F, --fileinput <name> input the data to be transmitted from a file\n\
-I, --stdin input the data to be transmitted from stdin\n\
-L, --listenport # port to recieve bidirectional tests back on\n\
-P, --parallel # number of parallel client threads to run\n\
-T, --ttl # time-to-live, for multicast (default 1)\n\
--linux-congestion <algo> set TCP congestion control algorithm (Linux only)\n\
\n\
Miscellaneous:\n\
-h, --help print this message and quit\n\
-v, --version print version information and quit\n\
\n\
[KM] Indicates options that support a K or M suffix for kilo- or mega-\n\
\n\
The TCP window size option can be set by the environment variable\n\
TCP_WINDOW_SIZE. Most other options can be set by an environment variable\n\
IPERF_<long option name>, such as IPERF_BANDWIDTH.\n\
\n\
Report bugs to <dast@nlanr.net>\n";
#endif
Report bugs to <iperf-users@lists.sourceforge.net>\n";
// include a description of the threading in the version
#if defined( HAVE_POSIX_THREAD )
@ -375,7 +328,7 @@ const char warn_invalid_report_style[] =
"WARNING: unknown reporting style \"%s\", switching to default\n";
const char warn_invalid_report[] =
"WARNING: unknown reporting type \"%c\"\n";
"WARNING: unknown reporting type \"%c\", ignored\n valid options are:\n\t exclude: C(connection) D(data) M(multicast) S(settings) V(server) report\n\n";
#ifdef __cplusplus
} /* end extern "C" */

Просмотреть файл

@ -76,11 +76,13 @@ void reporter_printstats( Transfer_Info *stats ) {
if ( stats->mUDP != (char)kMode_Server ) {
// TCP Reporting
printf( report_bw_header);
printf( report_bw_format, stats->transferID,
stats->startTime, stats->endTime,
buffer, &buffer[sizeof(buffer)/2] );
} else {
// UDP Reporting
printf( report_bw_jitter_loss_header);
printf( report_bw_jitter_loss_format, stats->transferID,
stats->startTime, stats->endTime,
buffer, &buffer[sizeof(buffer)/2],

Просмотреть файл

@ -118,9 +118,9 @@ const struct option long_options[] =
{"tos", required_argument, NULL, 'S'},
{"ttl", required_argument, NULL, 'T'},
{"single_udp", no_argument, NULL, 'U'},
{"ipv6_domian", no_argument, NULL, 'V'},
{"ipv6_domain", no_argument, NULL, 'V'},
{"suggest_win_size", no_argument, NULL, 'W'},
{"congestion", required_argument, NULL, 'Z'},
{"linux-congestion", required_argument, NULL, 'Z'},
{0, 0, 0, 0}
};
@ -375,12 +375,8 @@ void Settings_Interpret( char option, const char *optarg, thread_Settings *mExtS
break;
case 'h': // print help and exit
#ifndef WIN32
fprintf( stderr, usage_long );
#else
fprintf(stderr, usage_long1);
fprintf(stderr, usage_long2);
#endif
exit(1);
break;
@ -672,7 +668,6 @@ void Settings_Interpret( char option, const char *optarg, thread_Settings *mExtS
mExtSettings->mCongestion = new char[strlen(optarg)+1];
strcpy( mExtSettings->mCongestion, optarg);
#else
#error fix includes
fprintf( stderr, "The -Z option is not available on this operating system\n");
#endif
break;