Tcpstat reports certain network interface statistics much like vmstat does for system statistics. Statistics include bandwidth being used number of packets, average packet size, and much more.
Tcpstat collects network information either by reading data from filename, or it can collect information by directly monitoring the network interface interface. The default action for tcpstat is to automatically search for an appropriate interface, and to show current statistics on it.
Interval is the sample interval, in seconds, in which the statistics are based upon and when in default mode, how often the display is updated. If -1 is given, then the interval is taken to be the entire length of the
sample. Default is 5 seconds.
When reading data from filename, tcpstat will exit immediately after the entire file has been procesed. When collecting data from interface, tcpstat will exit upon recieving a SIGINT, or (if the -s option is specified) after seconds seconds, which ever comes first.
[ Man Page ]
tcpstat in accounting mode: tcpstat -a
tcpstat in live capture mode: tcpstat -i eth1