Skip navigation

JSI Tip 0814. NETSTAT -an displays TCP and UDP when only UDP is bound to the socket.

This is only a display problem and does not effect the connection.

NETSTAT displays protocol statistics and current TCP/IP network connections.

NETSTAT \[-a\] \[-e\] \[-n\] \[-s\] \[-p proto\] \[-r\] \[interval\]

  -a            Displays all connections and listening ports.  (Server-side
                connections are normally not shown).
  -e            Displays Ethernet statistics.  This may be combined with the -s
  -n            Displays addresses and port numbers in numerical form.
  -p proto      Shows connections for the protocol specified by proto; proto
                may be tcp or udp.  If used with the -s option to display
                per-protocol statistics, proto may be tcp, udp, or ip.
  -r            Displays the contents of the routing table.
  -s            Displays per-protocol statistics.  By default, statistics are
                shown for TCP, UDP and IP; the -p option may be used to specify
                a subset of the default.
  interval      Redisplays selected statistics, pausing interval seconds
                between each display.  Press CTRL+C to stop redisplaying
                statistics.  If omitted, netstat will print the current
                configuration information once.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.