This is a very simple script for measuring traffic on a local network interface under Linux. Before using it, adjust the configuration values and then run it.
There are two configuration options in the script:
eth_name=eth2: the network interface to inspectwait_time=100: the sampling interval in seconds
Because the script itself also takes a little time to run, a longer wait_time usually gives a smaller error.
The full script is shown below:
1 | !/bin/sh |