Using -p Option
When you use the -p option with the netstat command, it shows the connection for protocol defined by
proto. The syntax of the command is:
netstat -p [proto]
In the preceding syntax, simply replace the [proto netstat -p TCP section with appropriate entries. For example:
netstat –p TCP
Usually the -p option is used with the -s, option. It shows the per-protocol statistics that may be IP, IPv6, ICMP, ICMPv6, TCP, UDP, TCPv6, or UDPv6. For example, the syntax of the command is.
netstat –s – p TCP