netstat command small note

Source: Internet
Author: User

Netstat

Commands are used to display various network-related information, such as network connections, routing tables, Interface states (Interface Statistics), masquerade connections, multicast members (multicast memberships), and so on.
The output can be divided into two parts, an n active Internet connections, an active TCP connection, and a format of

Proto Recv-q Send-q Local Address Foreign Address
Agreement Accept Queue Send Queue Local address Ip:port Request Address Ip:port

There is also an active domain socket, active UNIX domain socket interface, only for local communication, but very high performance

Command Parameters function
-A (all) Show all options, default does not show listen related
-T (TCP) shows only TCP-related options
-U (UDP) show only UDP-related options
-N Refuse to display aliases, which can show all the numbers converted into numbers.
-L List only service statuses that are in Listen (listening)
-P Shows the name of the program that established the related link
-R Show routing information, routing table
-E Display extended information, such as UID, etc.
-S Statistics according to each protocol
-C Every other fixed time, execute the netstat command.

Instance:

List all ports netstat-a
List all TCP ports Netstat-at
List all UDP ports Netstat-au
Show only listening ports Netstat-l
List all listening TCP only Port Netstat-lt
List all listening UDP only Port Netstat-lu
Show statistics for all ports Netstat-s
Show PID and process name in netstat output Netstat-p
Display statistics for TCP or UDP ports Netstat-st or-su
Listening for a process on a network port Netstat-lntp

netstat command small note

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.