Configuration and implementation of Linux testing tool netstat

Source: Internet
Author: User

The netstat command is a useful tool for monitoring TCP/IP networks. It displays the route table, the actual network connection, and the status information of each network interface device. The following describes the implementation of the Linux testing tool netstat.

After running the Linux test tool netstat on a computer, the output result is as follows:
[Root @ lee/root] # netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Types State I-Node Path
For Unix 5 [] DGRAM 460/dev/log
Unix 0 [] stream connected 173 @ 00000014
Unix 0 [] DGRAM 662
Unix 0 [] DGRAM 631
Unix 0 [] DGRAM 544
Unix 0 [] DGRAM 484
Unix 0 [] DGRAM 470
[Root @ lee/root] #

As a whole, the output result of the Linux test tool netstat can be divided into two parts: the first part is Active Internet connections, which is called an Active TCP connection. In the output result above, 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 Linux testing tool netstat-a to view the status of all sockets, which is very useful when you debug network programs. The Linux test tool netstat-r will display the contents 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. Using the Linux test tool netstat-I will display all network interface information. The Linux testing tool netstat can also obtain the current network status and network topology, which is very useful in practice.

  1. Two Linux File System Performance testing tools
  2. Development and Application of linux Network Monitoring System
  3. Free browser Benchmark Test Tool Peacekeeper released
  4. System Monitoring: linux System Monitoring command details
  5. Java open-source software testing tools

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.