void print_usage()

in src/parameter.c [107:180]


void print_usage()
{
	printf("Author: %s\n", AUTHOR_NAME);
	printf("ntttcp: [-r|-s|-D|-M|-L|-e|-H|-P|-n|-l|-6|-u|-p|-f|-b|-B|-W|-t|-C|-N|-O|-x|-j|-Q|-V|-h|-m <mapping>]\n");
	printf("        [--show-tcp-retrans|--show-nic-packets|--show-dev-interrupts|--fq-rate-limit]\n\n");
	printf("\t-r   Run as a receiver\n");
	printf("\t-s   Run as a sender\n");
	printf("\t-D   Run as daemon\n");

	printf("\t-M   [receiver only] multi-clients mode\n");
	printf("\t-L   [sender only] indicates this is the last client when receiver is running with multi-clients mode\n");

	printf("\t-e   [receiver only] use epoll() instead of select()\n");
	printf("\t-H   [receiver only] hold receiver always running even after one test finished\n");

	printf("\t-P   Number of ports listening on receiver side	[default: %d] [max: %d]\n", DEFAULT_NUM_SERVER_PORTS, MAX_NUM_SERVER_PORTS);
	printf("\t-n   [sender only] number of threads per each receiver port     [default: %d] [max: %d]\n", DEFAULT_THREADS_PER_SERVER_PORT, MAX_THREADS_PER_SERVER_PORT);
	printf("\t-l   [sender only] number of connections per each sender thread [default: %d] [max: %d]\n", DEFAULT_CLIENT_CONNS_PER_THREAD, MAX_CLIENT_CONNS_PER_THREAD);

	printf("\t-6   IPv6 mode    [default: IPv4]\n");
	printf("\t-u   UDP mode     [default: TCP]\n");
	printf("\t-p   Destination port number, or starting port number    [default: %d]\n", DEFAULT_BASE_DST_PORT);
	printf("\t-f   Fixed source port number, or starting port number    [default: %d]\n", DEFAULT_BASE_SRC_PORT);
	printf("\t-b   <buffer size in n[KMG] Bytes>    [default: %d (receiver); %d (sender)]\n", DEFAULT_RECV_BUFFER_SIZE, DEFAULT_SEND_BUFFER_SIZE);
	printf("\t-B   <bandwidth limit in n[KMG] bits/sec> set limit to the bandwidth\n");

	printf("\t-W   Warm-up time in seconds          [default: %d]\n", DEFAULT_WARMUP_SEC);
	printf("\t-t   Time of test duration in seconds [default: %d]\n", DEFAULT_TEST_DURATION);
	printf("\t-C   Cool-down time in seconds        [default: %d]\n", DEFAULT_COOLDOWN_SEC);
	printf("\t-N   No sync, senders will start sending as soon as possible\n");
	printf("\t     Otherwise, will use 'destination port - 1' as sync port	[default: %d]\n", DEFAULT_BASE_DST_PORT - 1);
	printf("\t-O   Save console log to file, by default saves to %s\n", DEFAULT_CONSOLE_LOG_FILE_NAME);
	printf("\t-x   Save output to XML file, by default saves to %s\n", DEFAULT_XML_LOG_FILE_NAME);
	printf("\t-j   Save output to JSON file, by default saves to %s\n", DEFAULT_JSON_LOG_FILE_NAME);
	printf("\t-Q   Quiet mode\n");
	printf("\t-V   Verbose mode\n");
	printf("\t-h   Help, tool usage\n");

	printf("\t-m   <mapping>\tfor the purpose of compatible with Windows ntttcp usage\n");
	printf("\t     Where a mapping is a 3-tuple of NumberOfReceiverPorts, Processor, ReceiverAddress:\n");
	printf("\t     NumberOfReceiverPorts:    [default: %d]  [max: %d]\n", DEFAULT_NUM_SERVER_PORTS, MAX_NUM_SERVER_PORTS);
	printf("\t     Processor:\t\t*, or cpuid such as 0, 1, etc \n");
	printf("\t     e.g. -m 8,*,192.168.1.1\n");
	printf("\t\t    If for receiver role: 8 threads listening on 8 ports (one port per thread) on the network "
			"192.168.1.1;\n\t\t\tand those threads will run on all processors.\n");
	printf("\t\t    If for sender role: receiver has 8 ports listening on the network 192.168.1.1;\n\t\t\tsender will "
			"create 8 threads to talk to all of those receiver ports\n\t\t\t(1 sender thread to one receiver port; this "
			"can be overridden by '-n');\n\t\t\tand all sender threads will run on all processors.\n");
	printf("\n");

	printf("\t--show-tcp-retrans\tShow system TCP retransmit counters in log from /proc\n ");
	printf("\t--show-nic-packets <network interface name>\n");
	printf("\t\t\t\tShow number of packets transferred (tx and rx) through this network interface\n");
	printf("\t--show-dev-interrupts <device differentiator>\n");
	printf("\t\t\t\tShow number of interrupts for the devices specified by the differentiator\n");
	printf("\t\t\t\tExamples for differentiator: Hyper-V PCIe MSI, mlx4, Hypervisor callback interrupts, ...\n");
	printf("\t--fq-rate-limit\t\tLimit socket rate by Fair Queue (FQ) traffic policing\n");
	printf("\n");

	printf("Example:\n");
	printf("\treceiver:\n");
	printf("\t1) ./ntttcp -r\n");
	printf("\t2) ./ntttcp -r 192.168.1.1\n");
	printf("\t3) ./ntttcp -r -m 8,*,192.168.1.1 -6\n");
	printf("\t4) ./ntttcp -r -m 8,0,192.168.1.1 -6 --show-tcp-retrans --show-nic-packets eth0 --show-dev-interrupts mlx4 -V\n");
	printf("\tsender:\n");
	printf("\t1) ./ntttcp -s\n");
	printf("\t2) ./ntttcp -s 192.168.1.1\n");
	printf("\t3) ./ntttcp -s -m 8,*,192.168.1.1 -n 16 -6\n");
	printf("\t4) ./ntttcp -s 192.168.1.1 -P 64 -n 16 -l 10 -f25001 -6 -V\n");
	printf("\t3) ./ntttcp -s 192.168.1.1 --fq-rate-limit 10G\n");
	printf("\t4) ./ntttcp -s 192.168.1.1 -B 10G\n");
	printf("\t4) ./ntttcp -s 192.168.1.1 --show-tcp-retrans --show-nic-packets eth0 --show-dev-interrupts mlx4 -V\n");
}