Among the many commands in Linux, the netstat command is a console command for monitoring the TCP/IP network. It can display the status information of the routing table. It is a very useful command. This article will give a detailed introduction to the netstat command. Let's have a look at it with friends.
If your computer sometimes received data packets result in an error or malfunction, you should not be surprised, TCP /IP can allow these types of errors, and automatically retransmit packets. But if the cumulative number of error conditions is a significant percentage of the received IP datagram, or if its number is increasing rapidly, then you should use netstat to find out why this is happening.
1. Command format:
netstat [-acCeFghilMnNoprstuvVwx][-A "Network Type"][--ip]
2. Command function:
netstat is used to display statistics related to IP, TCP, UDP and ICMP protocols. It is generally used to check the network connection of each port of the machine.
3. Command parameters:
-a or –all Displays the Sockets in all connections.
-A "Network Type" or – "Network Type" Lists the relevant addresses in this network type connection.
-c or –continuous continuously lists network status.
-C or –cache Displays the cache information configured by the router.
-e or –extend Displays other relevant information about the network.
-F or –fib displays FIB.
-g or –groups Displays a list of multi-broadcast feature group members.
-h or –help online help.
-i or –interfaces displays the web interface information form.
-l or –listening Displays the Socket of the server being monitored.
-M or –masquerade shows the network connection of the disguise.
-n or –numeric directly uses an IP address instead of a domain name server.
-N or –netlink or –symbolic Displays the symbolic link name of the network hardware peripheral.
-o or –timers shows the timer.
-p or –programs Displays the program ID and program name of the socket being used.
-r or –route displays the Routing Table.
-s or –statistice Displays the network work information statistics table.
-t or –tcp Shows the connection status of the TCP transport protocol.
-u or –udp shows the connection status of the UDP transport protocol.
-v or –verbose Shows the execution of the instruction.
-V or –version displays version information.
-w or –raw shows the connection status of the RAW transport protocol.
-x or –unix The effect of this parameter is the same as the specified ”-A unix” parameter.
–ip or–inet The effect of this parameter is the same as the specified ”-A inet” parameter.
4. Example:
Instance 1: No parameters use
Command: netstat
Output:
The code is as follows:
[root@ Localhost ~]# netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 268 192.168.120.204 :ssh 10.2.0.68:62420 ESTABLISHED
udp 0 0 192.168.120.204:4371 10.58.119.119:domain ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ] DGRAM 1491 @/org/kernel/udev/udevd
unix 4 [ ] DGRAM 7337 /dev/log
unix 2 [ ] DGRAM 708823
unix 2 [ ] DGRAM 7539
unix 3 [ ] STREAM CONNECTED 7287
unix 3 [ ] STREAM CONNECTED 7286
[root@localhost ~]#
Previous123456Next page Total 6 pages
Linux needs to use Python, you need to configure its environment, because there are more steps invol
for Linux RRDtool is a way to store data, is a powerful drawing engine, so how to use RRDtool on Li
The rename command in the Linux command is mainly used to rename files. It is simil
Usually the system has its own firewall, the existence of the firewall to ensure th
How to use regular expressions in Linux system
What is the Linux system architecture?
Linux system strace operation example summary
What is the use of the pwd command in Linux?
Usage of the Linux tail command
What should I do if Xmanager fails to connect after the Solaris system is installed?
CentOS 6.5 install wireless network card driver tutorial
Debian boot does not enter the graphical interface method
How does Linux use tools to encrypt data?
What can I do if win7 can't find a broadband connection?
Detecting performance loss? FSCT to help
How to add new pictures to Win 7 desktop gadget picture puzzles
DVD+RW discs come back to life
Win8 system upgrade Win10 prompt "can not find Boot.WIM" how to deal with?
Why can't Windows XP with SP2 install IIS
Win7 Ultimate computer desktop icon only shows the name how to do
How to use Win8 one key recovery?
U disk boot Windows 7 operating system [group map]
Win10 RS2 version of Windows Defender concept "application" how to download and install