Linux command: Netstat

Source: Internet
Author: User

In the Internet RFC standard, netstat is defined as: Netstat is a program that accesses the network and related information in the kernel, and it can provide reports on TCP connection, TCP and UDP snooping, and process memory management.
Netstat is a console command and is a very useful tool for monitoring TCP/IP networks, which can display routing tables, actual network connections, and status information for each network interface device. The netstat is used to display statistics related to IP, TCP, UDP, and ICMP protocols, and is typically used to verify the network connectivity of each port on the machine.
If your computer sometimes receives data packets that cause error data or failures, you don't have to be surprised that TCP/IP can tolerate these types of errors and be able to automatically re-send packets. But if the cumulative number of errors accounts for a significant percentage of the IP datagram received, or if its number is increasing rapidly, then you should use Netstat to find out why these situations occur.
Netstat-an are generally used to display all connected ports and are represented by numbers.
The function of the netstat command is to display network connections, routing tables, and network interface information to let users know which network connections are in operation. [1] When used without parameters, Netstat displays the active TCP connection.


The meanings of the options in the command are as follows:

-a displays all sockets, including those being monitored.
-C Displays it again every 1 seconds until the user interrupts it.
-I displays information for all network interfaces in the format "Netstat-i".
-N Displays the network connection situation by replacing the name with the network IP address.
-R Displays the core routing table in the same format as "Route-e".
-T shows the connection of the TCP protocol
-U Displays the connection condition of the UDP protocol.
-V Displays the work in progress.
-P Displays the specified protocol information.
-B Displays the executable program involved in creating each connection or listening port.
-e Displays Ethernet statistics. This option can be used in conjunction with the-s option.
-F Displays the fully qualified domain name (FQDN) of the external address.
-O Displays the ID of the process that you have associated with each connection.
-S displays statistics for each protocol.
-X displays Networkdirect connections, listeners, and shared endpoints.
-y Displays all connected TCP connection templates. cannot be used in conjunction with other options.

Linux command: Netstat

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.