Linux network performance debugging tool Netstat command

Source: Internet
Author: User
Article title: Linux network performance debugging tool Netstat command. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

The Netstat command is a very useful tool for monitoring TCP/IP networks. The Linux network performance debugging tool Netstat command can display the route table, the actual network connection, and the status information of each network interface device.

After the Netstat command of the Linux network performance debugging tool runs Netstat on a computer, the output result is as follows:

1. [root @ lee/root] # netstat

2. Active Internet connections (w/o servers)

3. Proto Recv-Q Send-Q Local Address Foreign Address State

4. Active UNIX domain sockets (w/o servers)

5. Proto RefCnt Flags Types State I-Node Path

6. Unix 5 [] DGRAM 460/dev/log

7. Unix 0 [] stream connected 173 @ 00000014

8. Unix 0 [] DGRAM 662

9. Unix 0 [] DGRAM 631

10. Unix 0 [] DGRAM 544

11. Unix 0 [] DGRAM 484

12. Unix 0 [] DGRAM 470

13. [root @ lee/root] #

Overall, the output result of the Netstat command of the Linux network performance debugging tool can be divided into two parts: the first part is the Active Internet connections, called the Active TCP connection. in the preceding output, this part has no content, indicating that there is no TCP connection. The second part is Active UNIX domain sockets, which is called the interface of the Active Unix domain. The output shows the connection of the Unix domain interface:

· Proto displays the protocol used by the connection.

· RefCnt indicates the process number connected to this interface.

· Type of the Types display set interface.

· State: displays the current status of the set interface.

· Path indicates the Path name used by other processes connected to the set interface.

You can use Route-a to view the status of all sockets, which is useful when debugging network programs. Netstat-r will display the content of the route table. Generally, you must specify the "-n" option at the same time to obtain the address in digital format or the IP address of the default router. With Netstat-I, all network interfaces are displayed. Using Netstat can also obtain the current network status and network topology, which is very useful in practice.

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.