The netstat command is a monitoring tool that displays a wide range of network information.

Status information Command
To find the status of the configured network interfaces netstat -in
To check the routing information netstat -rn
To observe a system's mbuf usage netstat -m
To view the number of mbuf errors netstat -v
To see statistics for all protocols configured on the system netstat -s
To list the active sockets for your system netstat -a
For only one protocol netstat -p <protocol>
To show statistics for the IP protocol netstat -p ip
To show statistics for the Internet Control Message Protocol netstat -icmp
To show statistics for the TCP protocol netstat -p tcp
To show statistics for the UDP protocol netstat -p udp
To get information about packets sent and received, as well as sent and received and dropped netstat -D
To get the state of all sockets netstat -an
To get information about the network buffer cache netstat -c