--- iperf-2.0.5/src/stdio.c.orig Wed Mar 31 00:57:17 2010 +++ iperf-2.0.5/src/stdio.c Mon Aug 29 06:00:44 2011 @@ -160,10 +160,10 @@ /* labels for Byte formats [KMG] */ const char* kLabel_Byte[] = { - "Byte", - "KByte", - "MByte", - "GByte" + "B", + "KiB", + "MiB", + "GiB" }; /* labels for bit formats [kmg] */ @@ -170,7 +170,7 @@ const char* kLabel_bit[] = { "bit", - "Kbit", + "kbit", "Mbit", "Gbit" }; --- iperf-2.0.5/src/Locale.c.orig Wed Mar 31 00:57:17 2010 +++ iperf-2.0.5/src/Locale.c Mon Aug 29 21:01:19 2011 @@ -76,26 +76,28 @@ 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\ - -o, --output output the report or error message to this specified file\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 bind to , 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\ + -f, --format Unit format to use to report netto rates.\n\ + Unit can be k (kbit), m (Mbit), K (KiB), or M (MiB).\n\ + -i, --interval # seconds between periodic bandwidth reports\n\ + -l, --len #[Unit] length of buffer to read or write (defaults:\n\ + 128 KiB TCP, 1470 B UDP)\n\ + -m, --print_mss print TCP maximum segment size (MTU - TCP/IP header)\n\ + -o, --output file redirect the report and errors to the specified file\n\ + -p, --port # server port to listen on/connect to\n\ + -u, --udp use UDP rather than TCP\n\ + -w, --window #[Unit] TCP window size (socket buffer size)\n\ + -B, --bind host bind to the given host, 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" + -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" #ifdef WIN32 -" -R, --remove remove service in win32\n" +" -R, --remove remove service in win32\n" #endif ; @@ -102,28 +104,29 @@ const char usage_long2[] = "\ \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 run in client mode, connecting to \n\ + -b, --bandwidth #[Unit] for UDP, bandwidth to send at in bit/s\n\ + (default 1 Mibit/s, implies -u)\n\ + -c, --client run in client mode, connecting to \n\ -d, --dualtest Do a bidirectional test simultaneously\n\ - -n, --num #[KM] number of bytes to transmit (instead of -t)\n\ + -n, --num #[Unit] 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 input the data to be transmitted from a file\n\ - -I, --stdin input the data to be transmitted from stdin\n\ + -t, --time # time in seconds to transmit for (default 10 s)\n\ + -F, --fileinput file read the data to be transmitted from a file\n\ + -I, --stdin read the data to be transmitted from stdin\n\ -L, --listenport # port to receive 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\ + -P, --parallel # number of parallel client threads to run\n\ + -T, --ttl # time-to-live, for multicast (default 1)\n\ -Z, --linux-congestion 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\ + -x, --reportexclude What Exclude certain data from the report. What is a\n\ + combination of the following letters:\n\ + C(connection), D(data), M(multicast), S(settings),\n\ + V(server). E.g. CM\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\ -[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_, such as IPERF_BANDWIDTH.\n\ @@ -193,29 +196,28 @@ "[%3d] %5d bytes read %5d times (%.3g%%)\n"; const char report_bw_header[] = -"[ ID] Interval Transfer Bandwidth\n"; +"[ ID] Interval Transfer Bandwidth\n"; const char report_bw_format[] = -"[%3d] %4.1f-%4.1f sec %ss %ss/sec\n"; +"[%3d] %4.1f-%4.1f s %s %s/s\n"; const char report_sum_bw_format[] = -"[SUM] %4.1f-%4.1f sec %ss %ss/sec\n"; +"[SUM] %4.1f-%4.1f s %s %s/s\n"; const char report_bw_jitter_loss_header[] = -"[ ID] Interval Transfer Bandwidth Jitter Lost/Total \ -Datagrams\n"; +"[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams\n"; const char report_bw_jitter_loss_format[] = -"[%3d] %4.1f-%4.1f sec %ss %ss/sec %6.3f ms %4d/%5d (%.2g%%)\n"; +"[%3d] %4.1f-%4.1f s %s %s/s %6.3f ms %4d/%5d (%.2g%%)\n"; const char report_sum_bw_jitter_loss_format[] = -"[SUM] %4.1f-%4.1f sec %ss %ss/sec %6.3f ms %4d/%5d (%.2g%%)\n"; +"[SUM] %4.1f-%4.1f s %s %s/s %6.3f ms %4d/%5d (%.2g%%)\n"; const char report_outoforder[] = -"[%3d] %4.1f-%4.1f sec %d datagrams received out-of-order\n"; +"[%3d] %4.1f-%4.1f s %d datagrams received out-of-order\n"; const char report_sum_outoforder[] = -"[SUM] %4.1f-%4.1f sec %d datagrams received out-of-order\n"; +"[SUM] %4.1f-%4.1f s %d datagrams received out-of-order\n"; const char report_peer[] = "[%3d] local %s port %u connected with %s port %u\n"; --- iperf-2.0.5/man/iperf.1.orig Wed Apr 2 10:25:36 2008 +++ iperf-2.0.5/man/iperf.1 Mon Aug 29 20:53:23 2011 @@ -28,8 +28,9 @@ traffic). .SH "GENERAL OPTIONS" .TP -.BR -f ", " --format " " -[kmKM] format to report: Kbits, Mbits, KBytes, MBytes +.BR -f ", " --format " " Unit +format to use to report netto rates. Unit can be k (kbit), m (Mbit), K (KiB), +or M (MiB). .TP .BR -h ", " --help " " print a help synopsis @@ -37,14 +38,14 @@ .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) +.BR -l ", " --len " \fIn\fR[Unit]" +set length read/write buffer to \fIn\fR (default 128 KiB TCP, 1470 B UDP) .TP .BR -m ", " --print_mss " " print TCP maximum segment size (MTU - TCP/IP header) .TP -.BR -o ", " --output " " -output the report or error message to this specified file +.BR -o ", " --output " file" +redirect the report and errors to the specified file .TP .BR -p ", " --port " \fIn\fR" set server port to listen on/connect to to \fIn\fR (default 5001) @@ -52,11 +53,11 @@ .BR -u ", " --udp " " use UDP rather than TCP .TP -.BR -w ", " --window " \fIn\fR[KM]" +.BR -w ", " --window " \fIn\fR[Unit]" TCP window size (socket buffer size) .TP -.BR -B ", " --bind " " -bind to , an interface or multicast address +.BR -B ", " --bind " host" +bind to the given host, interface or multicast address .TP .BR -C ", " --compatibility " " for use with older versions does not sent extra msgs @@ -73,8 +74,9 @@ .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 +.BR -x ", " --reportexclude " " What +Exclude certain data from the report. What is a a sequence of the following +letters: C(connection), D(data), M(multicast), S(settings), V(server). E.g. CM .TP .BR -y ", " --reportstyle " C|c" if set to C or c report results as CSV (comma separated values) @@ -90,17 +92,17 @@ 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). +.BR -b ", " --bandwidth " \fIn\fR[Unit]" +set target bandwidth to \fIn\fR (default 1 Mibit/s). +This setting implies UDP (-u). .TP -.BR -c ", " --client " " -run in client mode, connecting to +.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]" +.BR -n ", " --num " \fIn\fR[Unit]" number of bytes to transmit (instead of -t) .TP .BR -r ", " --tradeoff " " @@ -107,13 +109,13 @@ Do a bidirectional test individually .TP .BR -t ", " --time " \fIn\fR" -time in seconds to transmit for (default 10 secs) +time in seconds to transmit for (default 10 s) .TP -.BR -F ", " --fileinput " " -input the data to be transmitted from a file +.BR -F ", " --fileinput " file" +read the data to be transmitted from a file .TP .BR -I ", " --stdin " " -input the data to be transmitted from stdin +read the data to be transmitted from stdin .TP .BR -L ", " --listenport " \fIn\fR" port to recieve bidirectional tests back on toupper coredumps sometimes w/o this patch --- iperf-2.0.5/src/ReportDefault.c.orig Wed Mar 31 00:57:17 2010 +++ iperf-2.0.5/src/ReportDefault.c Tue Aug 30 01:37:57 2011 @@ -70,7 +70,7 @@ static char header_printed = 0; byte_snprintf( buffer, sizeof(buffer)/2, (double) stats->TotalLen, - toupper( stats->mFormat)); + stats->mFormat ? toupper(stats->mFormat) : ' '); byte_snprintf( &buffer[sizeof(buffer)/2], sizeof(buffer)/2, stats->TotalLen / (stats->endTime - stats->startTime), stats->mFormat); @@ -113,7 +113,7 @@ void reporter_multistats( Transfer_Info *stats ) { byte_snprintf( buffer, sizeof(buffer)/2, (double) stats->TotalLen, - toupper( stats->mFormat)); + stats->mFormat ? toupper( stats->mFormat) : ' '); byte_snprintf( &buffer[sizeof(buffer)/2], sizeof(buffer)/2, stats->TotalLen / (stats->endTime - stats->startTime), stats->mFormat); @@ -186,7 +186,7 @@ } } byte_snprintf( buffer, sizeof(buffer), win, - toupper( data->info.mFormat)); + data->info.mFormat ? toupper(data->info.mFormat) : ' '); printf( "%s: %s", (isUDP( data ) ? udp_buffer_size : tcp_window_size), buffer ); @@ -194,7 +194,7 @@ printf( " %s", window_default ); } else if ( win != win_requested ) { byte_snprintf( buffer, sizeof(buffer), win_requested, - toupper( data->info.mFormat)); + data->info.mFormat ? toupper(data->info.mFormat) : ' '); printf( warn_window_requested, buffer ); } printf( "\n" );