The netstat Utility

The netstat Utility

The netstat utility allow you the inbound and outbound TCP/IP connection. This utility also provides information about TCP/IP statistics, such as how many packets have been dent and received and number of error. When you use the netstat command without its option, it shows the outbound TCP/IP connection. The syntax of the netstat command is:

netstat

 

The output of the netstat command shows four different columns: Proto, Local Address, Foreign Address, and State. The proto column displays the protocol being used. The local address column shows the source address and the source port. The foreign address column shows destination address with the destination port. The state column shows the status of each connection.

Option Description
-a Allows you to show all connections and attending ports.
-b Allows you to view the executable host involved in creating connection or attending port.
-e Shows the Ethernet statistics.
-f Shows Fully Qualified Domain Name (FQDN) for foreign address.
-n Shows the address and port number in numerical form.
-o Shows the owning process ID with each connection.
-s Displays per-protocol statistics.
-r Allows you to view the routing table.
-p proto Allows you to view the connection for protocol defined by Proto. The Porto will be TCP, UDP, TCPv6, or UDPv6. If you use the -s option with -p, it shows the per-protocol statistics; then the proto will be IP, IPv6, ICMP, ICMPv6, TCP, UDP, TCPv6, or UDPv6.

 

-t Shows the current connection offload state.
interval Redisplays the selected statistics, pausing every second during the display. Press Ctrl+C key combination to stop redisplay statistics.

 

 

 

 

 

.

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *