netstat (network statistics) is a command-line tool that displays network connections (both incoming and outgoing), routing tables, and a number of network interface statistics. It is available on Unix, Unix-like, and Windows NT-based operating systems.
It is used for finding problems in the network and to determine the amount of traffic on the network as a performance measurement.
Parameters used with this command must be prefixed with a hyphen (-) rather than a slash (/).
-a : Displays all active connections and the TCP and UDP ports on which the computer is listening.
-b : Displays the binary (executable) program's name involved in creating each connection or listening port. (Windows XP, 2003 Server and newer Windows operating systems (not Microsoft Windows 2000 or other non-Windows operating systems)) On Mac OS X when combined with -i, the total number of bytes of traffic will be reported.
-e : Displays ethernet statistics, such as the number of bytes and packets sent and received. This parameter can be combined with -s.