1 /*--------------------------------------------------------------- 2 * Copyright (c) 1999,2000,2001,2002,2003 3 * The Board of Trustees of the University of Illinois 4 * All Rights Reserved. 5 *--------------------------------------------------------------- 6 * Permission is hereby granted, free of charge, to any person 7 * obtaining a copy of this software (Iperf) and associated 8 * documentation files (the "Software"), to deal in the Software 9 * without restriction, including without limitation the 10 * rights to use, copy, modify, merge, publish, distribute, 11 * sublicense, and/or sell copies of the Software, and to permit 12 * persons to whom the Software is furnished to do 13 * so, subject to the following conditions: 14 * 15 * 16 * Redistributions of source code must retain the above 17 * copyright notice, this list of conditions and 18 * the following disclaimers. 19 * 20 * 21 * Redistributions in binary form must reproduce the above 22 * copyright notice, this list of conditions and the following 23 * disclaimers in the documentation and/or other materials 24 * provided with the distribution. 25 * 26 * 27 * Neither the names of the University of Illinois, NCSA, 28 * nor the names of its contributors may be used to endorse 29 * or promote products derived from this Software without 30 * specific prior written permission. 31 * 32 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 33 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 34 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 35 * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTIBUTORS OR COPYRIGHT 36 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 37 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 38 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE 39 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 40 * ________________________________________________________________ 41 * National Laboratory for Applied Network Research 42 * National Center for Supercomputing Applications 43 * University of Illinois at Urbana-Champaign 44 * http://www.ncsa.uiuc.edu 45 * ________________________________________________________________ 46 * 47 * Locale.c 48 * by Ajay Tirumala <tirumala@ncsa.uiuc.edu> 49 * & Mark Gates <mgates@nlanr.net> 50 * ------------------------------------------------------------------- 51 * Strings and other stuff that is locale specific. 52 * ------------------------------------------------------------------- */ 53 #include "headers.h" 54 #include "version.h" 55 56 #ifdef __cplusplus 57 extern "C" { 58 #endif 59 /* ------------------------------------------------------------------- 60 * usage 61 * ------------------------------------------------------------------- */ 62 63 const char usage_short[] = "\ 64 Usage: %s [-s|-c host] [options]\n\ 65 Try `%s --help' for more information.\n"; 66 67 const char usage_long1[] = "\ 68 Usage: iperf [-s|-c host] [options]\n\ 69 iperf [-h|--help] [-v|--version]\n\ 70 \n\ 71 Client/Server:\n\ 72 -b, --bandwidth #[kmgKMG | pps] bandwidth to read/send at in bits/sec or packets/sec\n\ 73 -e, --enhanced use enhanced reporting giving more tcp/udp and traffic information\n\ 74 -f, --format [kmgKMG] format to report: Kbits, Mbits, KBytes, MBytes\n\ 75 --hide-ips hide ip addresses and host names within outputs\n\ 76 -i, --interval # seconds between periodic bandwidth reports\n\ 77 -l, --len #[kmKM] length of buffer in bytes to read or write (Defaults: TCP=128K, v4 UDP=1470, v6 UDP=1450)\n\ 78 -m, --print_mss print TCP maximum segment size (MTU - TCP/IP header)\n\ 79 -o, --output <filename> output the report or error message to this specified file\n\ 80 -p, --port # client/server port to listen/send on and to connect\n\ 81 --permit-key permit key to be used to verify client and server (TCP only)\n\ 82 --sum-only output sum only reports\n\ 83 -u, --udp use UDP rather than TCP\n\ 84 -w, --window #[KM] TCP window size (socket buffer size)\n" 85 #ifdef HAVE_SCHED_SETSCHEDULER 86 " -z, --realtime request realtime scheduler\n" 87 #endif 88 " -B, --bind <host>[:<port>][%<dev>] bind to <host>, ip addr (including multicast address) and optional port and device\n\ 89 -C, --compatibility for use with older versions does not sent extra msgs\n\ 90 -M, --mss # set TCP maximum segment size (MTU - 40 bytes)\n\ 91 -N, --nodelay set TCP no delay, disabling Nagle's Algorithm\n\ 92 -S, --tos # set the socket's IP_TOS (byte) field\n\ 93 -Z, --tcp-congestion <algo> set TCP congestion control algorithm (Linux only)\n\ 94 \n\ 95 Server specific:\n\ 96 -p, --port #[-#] server port(s) to listen on/connect to\n\ 97 -s, --server run in server mode\n\ 98 -1, --singleclient run one server at a time\n\ 99 --histograms enable latency histograms\n\ 100 --permit-key-timeout set the timeout for a permit key in seconds\n\ 101 --tcp-rx-window-clamp set the TCP receive window clamp size in bytes\n\ 102 --tap-dev #[<dev>] use TAP device to receive at L2 layer\n\ 103 -t, --time # time in seconds to listen for new connections as well as to receive traffic (default not set)\n\ 104 --udp-histogram #,# enable UDP latency histogram(s) with bin width and count, e.g. 1,1000=1(ms),1000(bins)\n\ 105 -B, --bind <ip>[%<dev>] bind to multicast address and optional device\n\ 106 -U, --single_udp run in single threaded UDP mode\n\ 107 --sum-dstip sum traffic threads based upon destination ip address (default is src ip)\n\ 108 -D, --daemon run the server as a daemon\n" 109 #ifdef WIN32 110 " -R, --remove remove service in win32\n" 111 #endif 112 " -V, --ipv6_domain Enable IPv6 reception by setting the domain and socket to AF_INET6 (Can receive on both IPv4 and IPv6)\n" 113 ; 114 115 const char usage_long2[] = "\ 116 \n\ 117 Client specific:\n\ 118 -c, --client <host> run in client mode, connecting to <host>\n\ 119 --connect-only run a connect only test\n\ 120 --connect-retries # number of times to retry tcp connect\n\ 121 -d, --dualtest Do a bidirectional test simultaneously (multiple sockets)\n\ 122 --fq-rate #[kmgKMG] bandwidth to socket pacing\n\ 123 --full-duplex run full duplex test using same socket\n\ 124 --ipg set the the interpacket gap (milliseconds) for packets within an isochronous frame\n\ 125 --isochronous <frames-per-second>:<mean>,<stddev> send traffic in bursts (frames - emulate video traffic)\n\ 126 --incr-dstip Increment the destination ip with parallel (-P) traffic threads\n\ 127 --incr-dstport Increment the destination port with parallel (-P) traffic threads\n\ 128 --incr-srcip Increment the source ip with parallel (-P) traffic threads\n\ 129 --local-only Set don't route on socket\n\ 130 --near-congestion=[w] Use a weighted write delay per the sampled TCP RTT (experimental)\n\ 131 --no-connect-sync No sychronization after connect when -P or parallel traffic threads\n\ 132 --no-udp-fin No final server to client stats at end of UDP test\n\ 133 -n, --num #[kmgKMG] number of bytes to transmit (instead of -t)\n\ 134 -r, --tradeoff Do a fullduplexectional test individually\n\ 135 --tcp-write-prefetch set the socket's TCP_NOTSENT_LOWAT value in bytes and use event based writes\n\ 136 -t, --time # time in seconds to transmit for (default 10 secs)\n\ 137 --trip-times enable end to end measurements (requires client and server clock sync)\n\ 138 --txdelay-time time in seconds to hold back after connect and before first write\n\ 139 --txstart-time unix epoch time to schedule first write and start traffic\n\ 140 -B, --bind [<ip> | <ip:port>] bind ip (and optional port) from which to source traffic\n\ 141 -F, --fileinput <name> input the data to be transmitted from a file\n\ 142 -H, --ssm-host <ip> set the SSM source, use with -B for (S,G) \n\ 143 -I, --stdin input the data to be transmitted from stdin\n\ 144 -L, --listenport # port to receive fullduplexectional tests back on\n\ 145 -P, --parallel # number of parallel client threads to run\n" 146 #ifndef WIN32 147 " -R, --reverse reverse the test (client receives, server sends)\n" 148 #else 149 " -R Remove the windows service\n" 150 " --reverse reverse the test (client receives, server sends)\n" 151 #endif 152 " -S, --tos IP DSCP or tos settings\n\ 153 -T, --ttl # time-to-live, for multicast (default 1)\n\ 154 -V, --ipv6_domain Set the domain to IPv6 (send packets over IPv6)\n\ 155 -X, --peer-detect perform server version detection and version exchange\n\ 156 \n\ 157 Miscellaneous:\n\ 158 -x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports\n\ 159 -y, --reportstyle C report as a Comma-Separated Values\n\ 160 -h, --help print this message and quit\n\ 161 -v, --version print version information and quit\n\ 162 \n\ 163 [kmgKMG] Indicates options that support a k,m,g,K,M or G suffix\n\ 164 Lowercase format characters are 10^3 based and uppercase are 2^n based\n\ 165 (e.g. 1k = 1000, 1K = 1024, 1m = 1,000,000 and 1M = 1,048,576)\n\ 166 \n\ 167 The TCP window size option can be set by the environment variable\n\ 168 TCP_WINDOW_SIZE. Most other options can be set by an environment variable\n\ 169 IPERF_<long option name>, such as IPERF_BANDWIDTH.\n\ 170 \n\ 171 Source at <http://sourceforge.net/projects/iperf2/>\n\ 172 Report bugs to <iperf-users@lists.sourceforge.net>\n"; 173 174 // include a description of the threading in the version 175 #if defined( HAVE_POSIX_THREAD ) 176 #define IPERF_THREADS "pthreads" 177 #elif defined( HAVE_WIN32_THREAD ) 178 #define IPERF_THREADS "win32 threads" 179 #else 180 #define IPERF_THREADS "single threaded" 181 #endif 182 183 const char version[] = 184 "iperf version " IPERF_VERSION " (" IPERF_VERSION_DATE ") " IPERF_THREADS "\n"; 185 186 /* ------------------------------------------------------------------- 187 * settings 188 * ------------------------------------------------------------------- */ 189 190 const char separator_line[] = 191 "------------------------------------------------------------\n"; 192 193 const char server_port[] = 194 "Server listening on %s port %d\n"; 195 196 const char client_port[] = 197 "Client connecting to %s, %s port %d\n"; 198 199 const char server_pid_port[] = 200 "Server listening on %s port %d with pid %d\n"; 201 202 const char server_pid_portrange[] = 203 "Server listening on %s ports %d-%d with pid %d\n"; 204 205 const char client_pid_port[] = 206 "Client connecting to %s, %s port %d with pid %d (%d flows)\n"; 207 208 const char client_pid_port_dev[] = 209 "Client connecting to %s, %s port %d with pid %d via %s (%d flows)\n"; 210 211 const char bind_address[] = 212 "Binding to local address %s\n"; 213 214 const char bind_address_iface[] = 215 "Binding to local address %s and iface %s\n"; 216 217 const char bind_address_iface_taptun[] = 218 "Using virtual iface %s (AF_PACKET & SOCK_RAW)\n"; 219 220 const char multicast_ttl[] = 221 "Setting multicast TTL to %d\n"; 222 223 const char join_multicast[] = 224 "Joining multicast group %s\n"; 225 226 const char join_multicast_sg[] = 227 "Joining multicast (S,G)=%s,%s\n"; 228 229 const char join_multicast_starg_dev[] = 230 "Joining multicast (*,G)=*,%s w/iface %s\n"; 231 232 const char join_multicast_sg_dev[] = 233 "Joining multicast (S,G)=%s,%s w/iface %s\n"; 234 235 const char client_datagram_size[] = 236 "Sending %d byte datagrams, IPG target: %.2f us\n"; 237 238 const char client_datagram_size_kalman[] = 239 "Sending %d byte datagrams, IPG target: %.2f us (kalman adjust)\n"; 240 241 const char server_datagram_size[] = 242 "Receiving %d byte datagrams\n"; 243 244 const char tcp_window_size[] = 245 "TCP window size"; 246 247 const char udp_buffer_size[] = 248 "UDP buffer size"; 249 250 const char window_default[] = 251 "(default)"; 252 253 const char wait_server_threads[] = 254 "Waiting for server threads to complete. Interrupt again to force quit.\n"; 255 256 const char client_isochronous[] = 257 "Isochronous: %0.2f frames/sec mean=%s/s, stddev=%s/s, Period/IPG=%0.2f/%.3f ms\n"; 258 259 const char client_burstperiod[] = 260 "Bursting: %s every %0.2f seconds\n"; 261 262 const char server_burstperiod[] = 263 "Burst wait timeout set to (2 * %0.2f) seconds (use --burst-period=<n secs> to change)\n"; 264 265 const char client_fq_pacing [] = 266 "fair-queue socket pacing set to %s/s\n"; 267 268 /* ------------------------------------------------------------------- 269 * Legacy reports 270 * ------------------------------------------------------------------- */ 271 272 const char report_bw_header[] = 273 "[ ID] Interval Transfer Bandwidth\n"; 274 275 const char report_bw_format[] = 276 "%s" IPERFTimeFrmt " sec %ss %ss/sec\n"; 277 278 const char report_sum_bw_format[] = 279 "[SUM] " IPERFTimeFrmt " sec %ss %ss/sec\n"; 280 281 const char report_sumcnt_bw_format[] = 282 "[SUM-%d] " IPERFTimeFrmt " sec %ss %ss/sec\n"; 283 284 const char report_bw_jitter_loss_header[] = 285 "[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams\n"; 286 287 const char report_bw_jitter_loss_format[] = 288 "%s" IPERFTimeFrmt " sec %ss %ss/sec %6.3f ms %" PRIdMAX "/%" PRIdMAX " (%.2g%%)\n"; 289 290 const char report_sum_bw_jitter_loss_format[] = 291 "[SUM] " IPERFTimeFrmt " sec %ss %ss/sec %" PRIdMAX "/%" PRIdMAX " (%.2g%%)\n"; 292 293 const char report_sumcnt_bw_jitter_loss_header[] = 294 "[SUM-cnt] Interval Transfer Bandwidth Lost/Total PPS\n"; 295 296 const char report_sumcnt_bw_jitter_loss_format[] = 297 "[SUM-%d] " IPERFTimeFrmt " sec %ss %ss/sec %" PRIdMAX "/%" PRIdMAX " %8.0f pps\n"; 298 299 /* ------------------------------------------------------------------- 300 * Enhanced reports (per -e) 301 * ------------------------------------------------------------------- */ 302 const char report_sumcnt_bw_header[] = 303 "[SUM-cnt] Interval Transfer Bandwidth\n"; 304 305 const char client_report_epoch_start_current[] = 306 "[%3d] Client traffic to start in %d seconds at %s current time is %s\n"; 307 308 const char client_write_size[] = 309 "Write buffer size"; 310 311 const char server_read_size[] = 312 "Read buffer size"; 313 314 const char report_bw_enhanced_format[] = 315 "%s" IPERFTimeFrmt " sec %ss %ss/sec\n"; 316 317 const char report_sum_bw_enhanced_format[] = 318 "[SUM] " IPERFTimeFrmt " sec %ss %ss/sec\n"; 319 320 const char report_bw_read_enhanced_header[] = 321 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Reads=Dist\n"; 322 323 const char report_bw_read_enhanced_format[] = 324 "%s" IPERFTimeFrmt " sec %ss %ss/sec %d=%d:%d:%d:%d:%d:%d:%d:%d\n"; 325 326 const char report_sumcnt_bw_read_enhanced_header[] = 327 "[SUM-cnt] Interval" IPERFTimeSpace "Transfer Bandwidth Reads=Dist\n"; 328 329 const char report_sumcnt_bw_read_enhanced_format[] = 330 "[SUM-%d] " IPERFTimeFrmt " sec %ss %ss/sec %d=%d:%d:%d:%d:%d:%d:%d:%d\n"; 331 332 const char report_bw_read_enhanced_netpwr_header[] = 333 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Burst Latency avg/min/max/stdev (cnt/size) inP NetPwr Reads=Dist\n"; 334 335 const char report_bw_read_enhanced_netpwr_format[] = 336 "%s" IPERFTimeFrmt " sec %ss %ss/sec %.3f/%.3f/%.3f/%.3f ms (%d/%d) %s %s %d=%d:%d:%d:%d:%d:%d:%d:%d\n"; 337 338 const char report_sum_bw_read_enhanced_format[] = 339 "[SUM] " IPERFTimeFrmt " sec %ss %ss/sec %d=%d:%d:%d:%d:%d:%d:%d:%d\n"; 340 341 const char report_triptime_enhanced_format[] = 342 "%s" IPERFTimeFrmt " trip-time (3WHS done->fin+finack) = %.4f sec\n"; 343 344 #ifdef HAVE_STRUCT_TCP_INFO_TCPI_TOTAL_RETRANS 345 const char report_bw_write_enhanced_header[] = 346 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Write/Err Rtry Cwnd/RTT NetPwr\n"; 347 348 const char report_sum_bw_write_enhanced_format[] = 349 "[SUM] " IPERFTimeFrmt " sec %ss %ss/sec %d/%d%10d\n"; 350 351 const char report_bw_write_enhanced_format[] = 352 "%s" IPERFTimeFrmt " sec %ss %ss/sec %d/%d %10d %8dK/%u us %s\n"; 353 354 const char report_bw_write_enhanced_nocwnd_format[] = 355 "%s" IPERFTimeFrmt " sec %ss %ss/sec %d/%d %10d NA/%u us %s\n"; 356 357 const char report_write_enhanced_isoch_header[] = 358 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Write/Err Rtry Cwnd/RTT isoch:tx/miss/slip NetPwr\n"; 359 360 const char report_write_enhanced_isoch_format[] = 361 "%s" IPERFTimeFrmt " sec %ss %ss/sec %d/%d %8d %8dK/%u us %9" PRIuMAX "/%" PRIuMAX "/%" PRIuMAX " %s\n"; 362 363 const char report_write_enhanced_isoch_nocwnd_format[] = 364 "%s" IPERFTimeFrmt " sec %ss %ss/sec %d/%d %10d NA/%u us %9" PRIuMAX "/%" PRIuMAX "/%" PRIuMAX " %s\n"; 365 366 #else 367 const char report_bw_write_enhanced_header[] = 368 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Write/Err\n"; 369 370 const char report_bw_write_enhanced_format[] = 371 "%s" IPERFTimeFrmt " sec %ss %ss/sec %d/%d\n"; 372 373 const char report_sum_bw_write_enhanced_format[] = 374 "[SUM] " IPERFTimeFrmt " sec %ss %ss/sec %d/%d\n"; 375 376 const char report_write_enhanced_isoch_header[] = 377 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Write/Err isoch:tx/miss/slip\n"; 378 379 const char report_write_enhanced_isoch_format[] = 380 "%s" IPERFTimeFrmt " sec %ss %ss/sec %d/%d %9" PRIuMAX "/%" PRIuMAX "/%" PRIuMAX "\n"; 381 382 #endif 383 384 const char report_sumcnt_bw_write_enhanced_header[] = 385 "[SUM-cnt] Interval" IPERFTimeSpace "Transfer Bandwidth Write/Err Rtry\n"; 386 387 const char report_sumcnt_bw_write_enhanced_format[] = 388 "[SUM-%d] " IPERFTimeFrmt " sec %ss %ss/sec %d/%d%10d\n"; 389 390 const char report_bw_pps_enhanced_header[] = 391 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Write/Err PPS\n"; 392 393 const char report_bw_pps_enhanced_format[] = 394 "%s" IPERFTimeFrmt " sec %ss %ss/sec %d/%d %8.0f pps\n"; 395 396 const char report_sumcnt_bw_pps_enhanced_header[] = 397 "[SUM-cnt] Interval" IPERFTimeSpace "Transfer Bandwidth Write/Err PPS\n"; 398 399 const char report_sumcnt_bw_pps_enhanced_format[] = 400 "[SUM-%d] " IPERFTimeFrmt " sec %ss %ss/sec %d/%d %8.0f pps\n"; 401 402 const char report_bw_pps_enhanced_isoch_header[] = 403 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Write/Err PPS isoch:tx/miss/slip\n"; 404 405 const char report_bw_pps_enhanced_isoch_format[] = 406 "%s" IPERFTimeFrmt " sec %ss %ss/sec %d/%d %8.0f pps %3" PRIuMAX "/%" PRIuMAX "/%" PRIuMAX "\n"; 407 408 const char report_sum_bw_pps_enhanced_format[] = 409 "[SUM] " IPERFTimeFrmt " sec %ss %ss/sec %d/%d %8.0f pps\n"; 410 411 const char report_bw_jitter_loss_pps_header[] = 412 "[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams PPS\n"; 413 414 const char report_bw_jitter_loss_pps_format[] = 415 "%s" IPERFTimeFrmt " sec %ss %ss/sec %6.3f ms %" PRIdMAX "/%" PRIdMAX " (%.2g%%) %8.0f pps\n"; 416 417 const char report_bw_jitter_loss_enhanced_header[] = 418 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Jitter Lost/Total \ 419 Latency avg/min/max/stdev PPS NetPwr\n"; 420 421 const char report_bw_jitter_loss_enhanced_format[] = 422 "%s" IPERFTimeFrmt " sec %ss %ss/sec %6.3f ms %" PRIdMAX "/%" PRIdMAX " (%.2g%%) %.3f/%.3f/%.3f/%.3f ms %.0f pps %s\n"; 423 424 const char report_bw_jitter_loss_enhanced_triptime_header[] = 425 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Jitter Lost/Total \ 426 Latency avg/min/max/stdev PPS Rx/inP NetPwr\n"; 427 428 const char report_bw_jitter_loss_enhanced_triptime_format[] = 429 "%s" IPERFTimeFrmt " sec %ss %ss/sec %6.3f ms %" PRIdMAX "/%" PRIdMAX " (%.2g%%) %.3f/%.3f/%.3f/%.3f ms %.0f pps %s %s\n"; 430 431 const char report_bw_jitter_loss_enhanced_isoch_header[] = 432 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Jitter Lost/Total \ 433 Latency avg/min/max/stdev PPS NetPwr Isoch:rx/lost\n"; 434 435 const char report_bw_jitter_loss_enhanced_isoch_triptime_header[] = 436 "[ ID] Interval" IPERFTimeSpace "Transfer Bandwidth Jitter Lost/Total \ 437 Latency avg/min/max/stdev PPS Rx/inP NetPwr Isoch:rx/lost\n"; 438 439 const char report_bw_jitter_loss_enhanced_isoch_format[] = 440 "%s" IPERFTimeFrmt " sec %ss %ss/sec %6.3f ms %" PRIdMAX "/%" PRIdMAX " (%.2g%%) %.3f/%.3f/%.3f/%.3f ms %.0f pps %s %s %3d/%d\n"; 441 442 const char report_sum_bw_jitter_loss_enhanced_format[] = 443 "[SUM] " IPERFTimeFrmt " sec %ss %ss/sec %6.3f ms %" PRIdMAX "/%" PRIdMAX " (%.2g%%) %.0f pps\n"; 444 445 const char report_sumcnt_bw_jitter_loss_enhanced_format[] = 446 "[SUM-%d] " IPERFTimeFrmt " sec %ss %ss/sec %6.3f ms %" PRIdMAX "/%" PRIdMAX " (%.2g%%) %.0f pps\n"; 447 448 const char report_bw_jitter_loss_suppress_enhanced_format[] = 449 "%s" IPERFTimeFrmt " sec %ss %ss/sec %6.3f ms %" PRIdMAX "/%" PRIdMAX " (%.2g%%) -/-/-/- ms %.0f pps\n"; 450 451 /* 452 * Frame interval reports 453 */ 454 #define IPERFFTimeFrmt "%4.4f-%4.4f" 455 #define IPERFFTimeSpace " " 456 const char report_frame_jitter_loss_enhanced_header[] = 457 "[ ID] Interval(f-transit)" IPERFFTimeSpace "Transfer Bandwidth FrameID Jitter Lost/Total \ 458 Latency avg/min/max/stdev PPS inP NetPwr\n"; 459 460 const char report_frame_jitter_loss_enhanced_format[] = 461 "%s" IPERFFTimeFrmt "(%0.4f) sec %ss %ss/sec %" PRIdMAX " %6.3f ms %" PRIdMAX "/%" PRIdMAX " (%.2g%%) %.3f/%.3f/%.3f/%.3f ms %.0f pps %2.0f pkts %s\n"; 462 463 const char report_frame_jitter_loss_suppress_enhanced_format[] = 464 "%s" IPERFTimeFrmt "(%0.4f) sec %" PRIdMAX " %ss %ss/sec %" PRIdMAX " %6.3f ms %" PRIdMAX "/%" PRIdMAX " (%.2g%%) -/-/-/- ms %.0f pps\n"; 465 466 const char report_frame_tcp_enhanced_header[] = 467 "[ ID] Interval(f-transit)" IPERFFTimeSpace "Transfer Bandwidth FrameID\n"; 468 469 const char report_burst_read_tcp_header[] = 470 "[ ID] Burst (start-end)" IPERFFTimeSpace "Transfer Bandwidth XferTime (DC%) Reads=Dist NetPwr\n"; 471 472 const char report_burst_read_tcp_format[] = 473 "%s" IPERFTimeFrmt " sec %ss %ss/sec %6.3f ms (%.2g%%) %d=%d:%d:%d:%d:%d:%d:%d:%d %s\n"; 474 475 const char report_burst_read_tcp_final_format[] = 476 "%s" IPERFTimeFrmt " sec %ss %ss/sec %d=%d:%d:%d:%d:%d:%d:%d:%d\n"; 477 478 /* ------------------------------------------------------------------- 479 * Fullduplex reports 480 * ------------------------------------------------------------------- */ 481 const char report_bw_sum_fullduplex_format[] = 482 "%s" IPERFTimeFrmt " sec %ss %ss/sec\n"; 483 484 const char report_bw_sum_fullduplex_enhanced_format[] = 485 "[FD%d] " IPERFTimeFrmt " sec %ss %ss/sec\n"; 486 487 const char report_udp_fullduplex_header[] = 488 "[ ID] Interval Transfer Bandwidth Datagrams PPS\n"; 489 490 const char report_sumcnt_udp_fullduplex_header[] = 491 "[SUM-cnt] Interval Transfer Bandwidth Datagrams PPS\n"; 492 493 const char report_sumcnt_udp_fullduplex_format[] = 494 "[SUM-%d] " IPERFTimeFrmt " sec %ss %ss/sec %" PRIdMAX "%8.0f pps\n"; 495 496 const char report_udp_fullduplex_format[] = 497 "%s" IPERFTimeFrmt " sec %ss %ss/sec %" PRIdMAX "%8.0f pps\n"; 498 499 const char report_udp_fullduplex_enhanced_format[] = 500 "[FD%d] " IPERFTimeFrmt " sec %ss %ss/sec %" PRIdMAX "%8.0f pps\n"; 501 502 const char report_udp_fullduplex_sum_format[] = 503 "[SUM] " IPERFTimeFrmt " sec %ss %ss/sec %" PRIdMAX "%8.0f pps\n"; 504 505 /* ------------------------------------------------------------------- 506 * Misc reports 507 * ------------------------------------------------------------------- */ 508 const char report_outoforder[] = 509 "%s" IPERFTimeFrmt " sec %d datagrams received out-of-order\n"; 510 511 const char report_sumcnt_outoforder[] = 512 "[SUM-%d] " IPERFTimeFrmt " sec %d datagrams received out-of-order\n"; 513 514 const char report_l2statistics[] = 515 "%s" IPERFTimeFrmt " sec L2 processing detected errors, total(length/checksum/unknown) = %" PRIdMAX "(%" PRIdMAX "/%" PRIdMAX "/%" PRIdMAX ")\n"; 516 517 const char report_sum_outoforder[] = 518 "[SUM] " IPERFTimeFrmt " sec %d datagrams received out-of-order\n"; 519 520 const char report_peer [] = 521 "%slocal %s port %u connected with %s port %u%s\n"; 522 523 const char report_peer_dev [] = 524 "%slocal %s%%%s port %u connected with %s port %u%s\n"; 525 526 const char report_peer_fail [] = 527 "[drop] local %s port %u connection with %s port %u%s (permit key fail)\n"; 528 529 const char report_mss_unsupported[] = 530 "%sMSS and MTU size unknown (TCP_MAXSEG not supported)\n"; 531 532 const char report_mss[] = 533 "%sMSS size %d bytes\n"; 534 535 const char report_datagrams[] = 536 "[%3d] Sent %d datagrams\n"; 537 538 const char report_sumcnt_datagrams[] = 539 "[SUM-%d] Sent %d datagrams\n"; 540 541 const char report_sum_datagrams[] = 542 "[SUM] Sent %d datagrams\n"; 543 544 const char server_reporting[] = 545 "[%3d] Server Report:\n"; 546 547 const char reportCSV_peer[] = 548 "%s,%u,%s,%u"; 549 550 const char report_l2length_error[] = 551 "%s" IPERFTimeFrmt " sec %d datagrams received out-of-order\n"; 552 553 /*------------------------------------------------------------------- 554 * CSV outputs 555 *------------------------------------------------------------------*/ 556 const char reportCSV_bw_format[] = 557 "%s,%s,%d,%.1f-%.1f,%" PRIdMAX ",%" PRIdMAX "\n"; 558 559 const char reportCSV_bw_jitter_loss_format[] = 560 "%s,%s,%d,%.1f-%.1f,%" PRIdMAX ",%" PRIdMAX ",%.3f,%d,%d,%.3f,%d\n"; 561 562 /* ------------------------------------------------------------------- 563 * warnings 564 * ------------------------------------------------------------------- */ 565 566 const char warn_window_requested[] = 567 " (WARNING: requested %s)"; 568 569 const char warn_window_small[] = "\ 570 WARNING: TCP window size set to %d bytes. A small window size\n\ 571 will give poor performance. See the Iperf documentation.\n"; 572 573 const char warn_delay_large[] = 574 "WARNING: delay too large, reducing from %.1f to 1.0 seconds.\n"; 575 576 const char warn_no_pathmtu[] = 577 "WARNING: Path MTU Discovery may not be enabled.\n"; 578 579 const char warn_no_ack[]= 580 "[%3d] WARNING: did not receive ack of last datagram after %d tries.\n"; 581 582 const char warn_ack_failed[]= 583 "[%3d] WARNING: ack of last datagram failed.\n"; 584 585 const char warn_fileopen_failed[]= 586 "WARNING: Unable to open file stream for transfer\n\ 587 Using default data stream. \n"; 588 589 const char unable_to_change_win[]= 590 "WARNING: Unable to change the window size\n"; 591 592 const char opt_estimate[]= 593 "Optimal Estimate\n"; 594 595 #ifdef HAVE_FASTSAMPLING 596 const char report_interval_small[] = 597 "WARNING: interval too small, increasing to %3.4f milliseconds.\n"; 598 #else 599 const char report_interval_small[] = 600 "WARNING: interval too small, increasing to %3.3f milliseconds.\n"; 601 #endif 602 const char warn_invalid_server_option[] = 603 "WARNING: option -%c is not valid for server mode\n"; 604 605 const char warn_invalid_client_option[] = 606 "WARNING: option -%c is not valid for client mode\n"; 607 608 const char warn_invalid_compatibility_option[] = 609 "WARNING: option -%c is not valid in compatibility mode\n"; 610 611 const char warn_implied_udp[] = 612 "WARNING: option -%c implies udp testing\n"; 613 614 const char warn_implied_compatibility[] = 615 "WARNING: option -%c has implied compatibility mode\n"; 616 617 const char warn_buffer_too_small[] = 618 "WARNING: %s socket buffer size (-l value) increased to %d bytes for proper operation\n"; 619 620 const char warn_invalid_single_threaded[] = 621 "WARNING: option -%c is not valid in single threaded versions\n"; 622 623 const char warn_invalid_report_style[] = 624 "WARNING: unknown reporting style \"%s\", switching to default\n"; 625 626 const char warn_invalid_report[] = 627 "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"; 628 629 const char warn_server_old[] = 630 "WARNING: iperf server version is likely very old\n"; 631 632 const char warn_test_exchange_failed[] = 633 "WARNING: client/server version exchange failed\n"; 634 635 const char warn_len_too_small_peer_exchange[] = 636 "WARNING: %s option -l value of %d is too small for peer exchange (suggested min value is %d bytes)\n"; 637 638 const char warn_compat_and_peer_exchange[] = 639 "WARNING: Options of '-C' '--compatibility' AND '-X' '--peerdetect' are mutually exclusive, --peerdetect ignored\n"; 640 641 const char warn_start_before_now[] = 642 "[%3d] WARNING: --txstart-time (%" PRIdMAX ".%" PRIdMAX ") %s is before now %s\n"; 643 644 const char error_starttime_exceeds[] = 645 "ERROR: --txstart-time (%" PRIdMAX ".%" PRIdMAX ") %s exceeds max scheduled delay of %d secs\n"; 646 647 const char error_delaytime_exceeds[] = 648 "ERROR: --txdelay-time of %d seconds is more than the supported delay of %d seconds\n"; 649 650 #ifdef __cplusplus 651 } /* end extern "C" */ 652 #endif 653