Netstat can show both TCP and UDP traffic. It can show the routing table. It also can show statistics for network protocols like Ethernet. The program was written by Fred Baumgarten. It is widely available on operating systems like UNIX, Windows, and Macintosh. The netstat program is allegedly replaced by the ss program on Linux machines.
One thing that might require some explaining is the state of the connection that the program displays. Here are the types of states and a description of each:
- listening - waiting for reply from host
- established - connection has been made
- close_wait - the foreign host closed the connection, but you are still waiting for data
- time_wait - you closed the connection, but it is still in a waiting state