Linux Command-netstat

Source: Internet
Author: User
The netstat command is used to print network connections, route tables, and interface information, summary of usage of pseudo-join and multicast member information netstat-T |-u |-w |-L |-A |-N |-o |-p |-N |-H netstat prints information about the network subsystem in Linux. The information type is controlled by the given first parameter. (none) If no parameter exists, netstat displays all opened sockets 2. -- Route R shows the kernel route table 3. -- groups-G: displays multicast group members of IPv4 and IPv6. 4. -- interfacs-I: displays information about all network interfaces. 5. -- masquerade-M: Display multicast connections. 6. -- statistics-S: displays statistics of each Protocol
Option-verbose-V tells users which data may be redundant, in particular, some information about the unconfigured address family will be printed-Numeric-N displays the address represented in numbers-Numeric-hosts displays the host address in numbers, but it does not affect the resolution of port or user name -- Numeric-ports uses numbers to represent the port number, but does not affect the resolution of host or user name -- Numeric-users uses numbers to represent the user's id -- protocol = family, -A specifies the address family. The family is separated by commas (,), such as Inet, UNIX, IPX, ax25, nettrom, and DDP. These are equivalent to the following: -- Inet, -- Unix (-x), -- IPX, -- ax25, -- netrom, -- DDP-C, -- continuous, the information of the specified option is continuously printed every second-E, -- extend displays additional information, which can only be used twice at the same time-o, -- timers includes information related to the network timer-P, -- program displays PID, the name of each socket program-L, -- listening: only the socket-A in the listening state is displayed,-All: listening: the socket for obtaining non-listening, with the -- interfaces option, displays inactive interfaces.-F prints outbound Information Based on fib.-C
Print route information from the route Cache
Output Description: active Internet connections (TCP, UDP, raw)
Protocol used by proto socket (TCP, UDP, raw) recv-Q no number of bytes copied from the socket user program send-Q number of bytes unconfirmed by the remote host Local Address address and port number after the host, such as zyw. local: 55466 foreign address remote socket address and port number state socket status (11): estabished, syn_sent, syn_recv, fin_wait1, fin_wait2, time_wait, close, close_wait, last_ack, listen, closing: the user name of the user socket owner or the user idpid/program namepid and the process name that owns the socket. Use/to separate the timer information.
Active Unix domain socketsproto Uinx SOCKET protocol
Flags so_accepton, so_waitdata, so_nospace,
Type sock_dgram User Datagram mode sock_stream is used for streaming socket sock_ram for original socket sock_rdm for reliable transmission of sock_seqpacket messages for ordered grouping sockets
State free socket is not allocated listening socket is in the status of listening for connection requests connecting socket is about to establish connection connected socket already connected disconnecting socket is disconnecting PID/program name process ID and already on behalf of the socket Process name
Path: the path of the program that communicates with the socket
Network-Related File Location/etc/Servics network service file/proc stores information about each process, you can view the kernel status information/proc/NET/dev device information/proc/NET/RAW Raw socket information/proc/NET/tcp TCP socket information/Pro/NET/udp UDP socket Information

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.