The Netstat of Linux commands

Source: Internet
Author: User
Tags domain name server

The netstat command is used to print the status information of network systems in Linux, allowing you to know the network conditions of the entire Linux system.

-A or--all: Displays all sockets in the connection,-a< network type > or--< network type;: Lists the relevant addresses in the network type connection;-C or--continuous: The network status is continuously listed; C or--cache: Displays the cache information for the router configuration,-E or--extend: Displays other relevant information about the network;-F or--fib: Show fib,-G or--groups: Displays the multi-broadcast feature group members list;-H or--help: online help; I or--interfaces: Displays the network interface information form;-L or--listening: Displays the socket of the server in the monitor,-M or--masquerade: Displays the spoofed network connection,-N or--numeric: Use the IP address directly, Instead of through the domain name server,-N or--netlink or--symbolic: Displays the symbolic connection name of the network hardware peripheral device,-O or--timers: Display timer,-P or--programs: shows the program identification code and program name of the socket being used; R or--route: Displays routing Table;-S or--statistice: Displays the statistics of the network work information;-T or--tcp: shows the connection status of the TCP transport protocol;-U or--UDP: Displays the connection status of the UDP transport protocol; V or--verbose: Displays the instruction execution process,-V or--version: Displays version information,-W or--raw: Displays the connection status of the raw transport protocol,-X or--unix: The effect of this parameter is the same as specifying the "-A unix" parameter;-- IP or--inet: The effect of this parameter is the same as specifying the "-A inet" parameter.

List all ports (both listening and not listening)

Netstat--

List all Sockets in the listening state

netstat---

Show statistics for each protocol

Netstat---SU displays statistics for UDP ports 

IP and TCP analysis view the IP addresses that connect to a service port:

grep :awk'{print $}'cutawk ' {++ip[$1]} END {for (i-in IP) print ip[i], "\ t", I} ' Sort

TCP Various status lists:

grep 127.0. 0.1 0.0. 0.0 awk ' /^tcp/{++state[$NF]} END {for (I-in state) print I, "\ T", State[i]} '

View the number of phpcgi processes, and if they are close to the preset, they are not enough and need to be increased:

grep " php-cgi " WC -L

The Netstat of Linux commands

Related Article

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.