Netcat

nc — arbitrary TCP and UDP connections and listens

The nc (or netcat) utility is used for just about anything under the sun involving TCP, UDP, or UNIX-domain sockets. It can open TCP connections, send UDP packets, listen on arbitrary TCP and UDP ports, do port scanning, and deal with both IPv4 and IPv6.

-lListen for an incoming connection rather than initiating a connection to a remote host.
The destination and port to listen on can be specified either as non-optional arguments, or with options -s and -p respectively.
-s sourceaddrSet the source address to send packets from, which is useful on machines with multiple interfaces.
-p source_portSpecify the source port nc should use, subject to privilege restrictions and availability.
-uUse UDP instead of TCP.
nc -l 8000
nc -l -s 192.168.0.1 -p 8000

mbuffer – measuring buffer

mbuffer buffers I/O operations and displays the throughput rate. It is multi-threaded, supports network connections, and offers more options than the standard buffer.

-qquiet – do not display the status on the standard error output
-s <size>Use blocks of size bytes for buffer (default is determined on startup)
-m <size>Use a total of size bytes for buffer (default 2% of available memory) – size can be set with a trailing character
(b and B for Byte, k for kByte, M for MByte, G for Gigabyte, and with % for a percentage of total physical memory)
-W <timeout>Activates a watchdog that gets triggered every timeout seconds and checks whether I/O activity has stalled.
mbuffer -q -s 128k -m 1G

pv – monitor the progress of data through a pipe

pv shows the progress of data through a pipeline by giving information such as time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA.

-r, --rateTurn the rate counter on. This will display the current rate of data transfer.
-t, --timerTurn the timer on. This will display the total elapsed time that pv has been running for.
-a, --average-rateTurn the average rate counter on. This will display the average rate of data transfer so far.
-b, --bytesTurn the total byte counter on. This will display the total amount of data transferred so far.
pv -rtab