Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The netstat program displays the state of Internet and UNIX domain sockets on a system. It is a useful debugging tool when writing socket applications. Most UNIX implementations provide a version of netstat, although there is some variation in the syntax of its command-line arguments across implementations.
By default, when executed with no command-line options, netstat displays information for connected sockets in both the UNIX and Internet domains. We can use a number of command-line options to change the information displayed. Some of these options are listed in Table 61-1.