ntools

ngen

nrecv

nserver

nclient

nemu

nemud
NAME

nclient - the TCP client program of ntools

SYNOPSIS

nclient -ip server [-port port] [-max maxclients] [-file distfile] [-wait waittime] [-prec prec] [-tos tos] [-int statinterval] [-stat statfile]

DESCRIPTION

nclient is the TCP client program of ntools that emulates a number of Web clients. Each client connects to nserver at the specified address, downloads a number of bytes, and exits. nclient starts the client threads with poissonian process, which means that the time between the start of the threads is exponential. You can set the average of this time with the waittime parameter. You can also set an upper limit on the number of active threads with the maxclients paramter. If this limit is reached, the program will not start new downloads.

The number of bytes to be downloaded is generated randomly based on the distfile distribution file.

nclient also provides statistics about the downloads: it shows TCP goodput, the number of downloads, and the average download time for each file size. The first entry in the statistics is special, it shows the number of incomplete downloads, where the connection got broken before the download could be finished.

OPTIONS

-ip server

The IP address of the host where nserver is running.

-port port

The TCP port where nserver waits for incoming connections. If not specified, the default value is 8888.

-max maxclients

The maximum number of client threads that can run on the machine. The default is 10.

-file distfile

The distribution file with the file sizes. The default is 'distfile' in the local directory.

-wait waittime

The average time in seconds between the start time of the client threads. The default is 1. Postfix of ’m’ can be used for millisec.

-prec precedence

Sets the precedence value to be used for packet sending. Its valid range is 0..7, the default is 0.

-tos tos

Sets the Type of Service value to be used for packet sending. Its valid range is 0..255, the default is 0. Note that for TCP streams the last 2 bits will be cleared by the kernel.

-int statinterval

Sets the statistical interval in seconds. The program generates statistics in each interval. The default is 1.

-stat statfile

If this parameter is set, the program will also save the statistics to the given file.

DISTRIBUTION FILE

The distribution file contains entries in the following manner:

size probability

size specifies a file size in bytes, probability is the relative probability for this size. (E.g. if probability for size1 is 10, and probability for size2 is 1, then the first file size will be downloaded 10 times more than the second.)
Only 100 entries are processed from the file, and the sum of the probabilities must not be bigger than 1000. (If you don't like these restrictions, you can modify the defs.h header file, and recompile the package.) Everything after '#' on a line is considered as comment and ignored.

NOTES

nserver must be running before starting nclient

SEE ALSO

ntools, nserver

AUTHOR

Norbert Vegh,

COPYRIGHT

ntools is (C) 2002-2010 Norbert Vegh.

The program was originally developed in Telia Research AB.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.