Linux Command tool: netstat is a command tool used to view the network connection status of the system. It can view all network-related information, for example, in a wdOS or wdcp one-click package, sometimes a website, when the backend cannot be opened, you can use netstat on the SSH connection to view the port status, such as netstat-lnpt, to list the ports, program names, and IDs of all system listeners, determine whether the service is not started or for other reasons: www.2cto.com [root @ wdcp ~] # Netstat-lnpt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0.0.0.0: 3306 0.0.0.0: * LISTEN 2668/mysqld tcp 0 0 0.0.0.0: 8080 0.0.0.0: * LISTEN 2719/httpd tcp 0 0.0.0.0: 80 0.0.0.0: * LISTEN 2685/httpd as shown in the preceding result, which ports are monitored by the system, which programs are, etc. sort out some common parameters or option lists. Route netstat-r www.2cto.com to list all ports. netstat-a to list all tcp ports. netstat-at to list all udp ports. Port netstat-au only displays listening port netstat-l only lists all listening udp ports netstat-lu only lists all listening UNIX ports netstat-lx display port statistics netstat-s display Network Interface list netstat-I lists various TCP status lists netstat-nat | awk '{print $6}' | sort | uniq-c | sort-rn more parameters refer to netstat-h Parameters: -a or -- all indicates the sockets in all connections. -A <network type> or -- <network type> lists the related addresses of the network type connections. -C or -- continuous continuously lists the network status. -C or -- cache displays the cache information configured by the router. -E or -- extend displays other network-related information. -F or -- fib displays FIB. -G or -- groups displays a list of members of the Multi-Broadcast Function Group. -H or -- help Online help. -I or -- interfaces displays the network interface information form. -L or -- listening displays the Socket of the monitored server. -M or -- masquerade displays disguised network connections. -N or -- numeric directly uses the IP address instead of the Domain Name Server. -N or -- netlink or -- symbolic display the symbolic connection name of the network hardware peripheral device. -O or -- timers displays the timer. Www.2cto.com-p or -- programs displays the program identification code and program name using Socket. -R or -- route displays the Routing Table. -S or -- statistice displays a statistical table of network work information. -T or -- tcp shows the connection status of the TCP transmission protocol. -U or -- udp shows the connection status of UDP transmission protocol. -V or -- verbose displays the command execution process. -V or -- version displays version information. -W or -- raw shows the connection status of the RAW transmission protocol. -X or -- unix: the effect of this parameter is the same as that of the specified "-A unix" parameter. -- Ip or -- inet this parameter has the same effect as the specified "-A inet" parameter. From wdliux Knowledge Base