Screenshots - Usage

KISS — Keep It Simple, Stupid

Plainest use of netsend is to fire-up the server (trasmit mode) with the sendfile as the trailling argument ...

Transmitter:

          
netsend tcp transmit largefile localhost

... and launch netsend in the receive mode and connect netsend to localhost (cause the server running on the same host). That's simple - isn't it?

Receiver:

          
netsend tcp receive

Interpret Output

This paragraph illustrated some values when you print the statistic. You can switch on statistics output with option -T. If you add another T (-TT), the output will be more human readable.

Here is an example output (netsend is called with options:
-u rw -Tt -vv -N $((1024 * 4)) largefile ::1 for a 40K file.

          
netsend - 0.01 transmit mode (file: largefile - hostname: ::1) socket created - protocol tcp(6) socket connected to ::1 via port 6666 ** tx statistics (c3po | 2.6.15-secure-g88026842 | i686) ** tx-calls: 10000 (write) tx-amount: 40960000 Byte (40000 KiB, 39 MiB) real: 0.4585 sec utime: 0.0160 sec stime: 0.2240 sec cpu: 0.2400 sec (cpu/real: 52.35%) cpu-ticks: 435524325 cycles swaps: 0 voluntary cs: 832 nice cs: 14 throughput: 87249.94710 KiB/sec (85.20503 MiB/sec)

tx-calls

This is number of calls which are necessary to transmit the whole file. In this example we use write(2) to transmit data to the socket. Because we send in 4096 byte chunks (1024 * 4, netsend option -N) we need exactly 1000 write calls.

tx-amount

This is the number of bytes send. Note the notation Byte, KiB and MiB. Netsend is able to display units in SI- and Binary Notation. You can tune this with option -8 and -I.

real

This is the time in seconds which are necessary to trasmit the file. Other processes which interrupt netsend are also acounted as well. So this is the time difference bevor the first call to write and after the last call to write.

utime

utime is the time spend execution in user-mode. For a detailed description of user- and systemmode (kernelmode) ask you search engine of choice. Systemcalls and Interrupts for example are transitions to the systemmode. Usermode dominant application is e.g. a math program with many calculations

stime

stime is the time spend execution in system-mode.

cpu

cpu is the cumulative time of utime and stime. So cpu-time is the time which netsend is running.

cpu-ticks

Is the counted processor ticks since programstart. So this is a high resolution timer (with some drawbacks e.g. cpu throttling). If you divide this values by you cpu frequenz, this result in realseconds. For this example: 435524325 / 950125000 (950Mhz CPU) = 0.458386 seconds.

swaps

voluntary cs

This is the total number of voluntary context switches for netsend. This occurs when netsend gives up it's time slice. This happends when netsend waiting for some type of resource (e.g. IO Operation) to become available.

nice cs

The number of context switches because a higher priority process becoming runnable.

throughput

This is the number of bytes transmitted divided by the real seconds. This values is also effected by the netsend options -I and -8.

Mashine Parseable Format

Netsend is though option -M able to output the statistic in a more mashine readable format. This is intended for further processing -- for example if you wan't to plot some details.
          
# ./netsend -u rw -Tt -M -N $((1024 * 4)) largefile ::1 0.01 tx write 10000 40960000 0.4675 0.0040 0.2240 0.2280 0 832 7
Format String for version 0.01: 0.01 tx write 10000 40960000 0.4675 0.0040 0.2240 0.2280 0 832 7
  • column 01 (0.01): netsend version
  • column 02 (tx): transmit mode (rx | tx)
  • column 03 (write): used io function (sendfile, write, mmap, read)
  • column 04 (10000): number of io calls
  • column 05 (40960000): bytes trasmitted or received
  • column 06 (0.4675): real time
  • column 07 (0.0040): user time
  • column 08 (0.2240): system time
  • column 09 (0.2280): cumulative cpu time
  • column 10 (0): swap usage
  • column 11 (832): voluntary context switches
  • column 12 (7): nice context switches
Format String for version 002:
002 tx mmap willneed 1024 0 100000 102400000 1.2446 0.0280 0.5960 0.6240 0 2083 40
  • column 01 (002): netsend version
  • column 02 (tx): transmit mode (rx | tx)
  • column 03 (mmap): used io function (sendfile, write, mmap, read)
  • column 04 (willneed): memory advise (or string default)
  • column 05 (1024): selected chunk-size (-N) or value 0 (default, sendfile e.g. whole file)
  • column 06 (0): nice level (0: default)
  • column 07 (100000): number of io calls
  • column 08 (102400000): bytes trasmitted or received
  • column 09 (0.4675): real time
  • column 10 (0.0040): user time
  • column 11 (0.2240): system time
  • column 12 (0.2280): cumulative cpu time
  • column 13 (0): swap usage
  • column 14 (832): voluntary context switches
  • column 15 (7): nice context switches