nuttcp is a TCP/UDP network testing tool, much like iperf. I think it's the best such tool available, for its simplicity, ease of use, and feature set.
Official Site: http://www.lcp.nrl.navy.mil/nuttcp/ (html) Look in beta for the latest Official Site: ftp://ftp.lcp.nrl.navy.mil/pub/nuttcp/ (ftp) Local copies: http://www.wcisd.hpc.mil/nuttcp/
cc -O3 -o nuttcp nuttcp-7.1.6.cI copy it to /usr/local/bin/nuttcp but you could put it anywhere. It does NOT need any special permissions to run.
nuttcp hostname (transmits to hostname) nuttcp -r hostname (receives from hostname)type "nuttcp" to see lots of options. Most useful:
-i1 to watch tests run (1 second intervals) -w8m to set socket buffers ("window") to 8 MBytes -u for UDP tests -R10m for a 10 Mbps UDP test (or TCP rate limit) -l512 to set UDP packet length (or TCP write size)
With servers running on remote machines you can also do third party tests:
nuttcp host1 host2
nuttcp 5000/tcp nuttcp-data 5001/tcpThis tells xinetd what port to listen on for the "nuttcp" service.
chkconfig nuttcp4 on chkconfig nuttcp6 onIf you don't have or don't want IPv6, only enable nuttcp4.
Note on IPv6 and old xinetd's:
Modern xinetd's can listen for IPv4 and IPv6 services on the same port. Old ones (e.g. Redhat 8.0) can't. I'm not sure when this changed. For old systems just use the nuttcp file for xinetd.d. If you also want IPv6 you will have to start another service on a different port.
host1$ nuttcp -i1 -w8m host2 83.1246 MB / 1.00 sec = 699.7341 Mbps 118.0095 MB / 1.00 sec = 990.0559 Mbps 118.0095 MB / 1.00 sec = 990.0886 Mbps 118.0009 MB / 1.00 sec = 989.9823 Mbps 118.0095 MB / 1.00 sec = 990.0718 Mbps 118.0095 MB / 1.00 sec = 990.0757 Mbps 118.0009 MB / 1.00 sec = 989.9744 Mbps 118.0095 MB / 1.00 sec = 990.0807 Mbps 118.0095 MB / 1.00 sec = 990.0896 Mbps 118.0009 MB / 1.00 sec = 989.9893 Mbps 1157.4375 MB / 10.10 sec = 961.4075 Mbps 16 %TX 10 %RX
This shows a 10 second TCP test from host1 to host2 with a window size of 8 MBytes. It ran at 990 Mbps (GigE with 9000 byte jumbo frames) most of the time. The first second or two is often slower due to TCP slow start. The average for the entire test was 961 Mbps. During each second it sent ~118 MBytes. The percentages at the end mean that nuttcp consumed 16% of the CPU on the transmitter (host1) and 10% of the CPU on the receiver (host2). They are useful for telling if you were CPU limited and should not be confused as packet loss or retransmits.
http://www.wcisd.hpc.mil/nuttcp/Nuttcp-HOWTO.html Phil Dykstra Mar 2012