linux netstat(网络信息统计) 工具说明及使用方法(检验本机各端口的网络连接情况,显示网络连接路由表网络接口)

Posted Dontla

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux netstat(网络信息统计) 工具说明及使用方法(检验本机各端口的网络连接情况,显示网络连接路由表网络接口)相关的知识,希望对你有一定的参考价值。

文章目录

netstat 介绍

在Internet RFC标准中,Netstat的定义是: Netstat是在内核中访问网络连接状态及其相关信息的程序,它能提供TCP连接,TCP和UDP监听,进程内存管理的相关报告。

Netstat是控制台命令,是一个监控TCP/IP网络的非常有用的工具,它可以显示路由表、实际的网络连接以及每一个网络接口设备的状态信息。Netstat用于显示与IP、TCP、UDP和ICMP协议相关的统计数据,一般用于检验本机各端口的网络连接情况。

如果你的计算机有时候接收到的数据包导致出错数据或故障,你不必感到奇怪,TCP/IP可以容许这些类型的错误,并能够自动重发数据包。但如果累计的出错情况数目占到所接收的IP数据报相当大的百分比,或者它的数目正迅速增加,那么你就应该使用Netstat查一查为什么会出现这些情况了。

一般用netstat -an来显示所有连接的端口并用数字表示。

(我们海康摄像头启动hikflow_demo后,那么多TIME_WAIT的,老感觉有问题啊!)

# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:7681            0.0.0.0:*               LISTEN      
tcp        0      0 192.168.1.69:59240      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:45704      192.168.1.112:21        TIME_WAIT   
tcp        0      0 192.168.1.69:59412      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59270      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59286      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59336      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59294      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59374      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59250      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59438      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:47818      192.168.1.112:22803     TIME_WAIT   
tcp        0      0 192.168.1.69:60230      192.168.1.112:35579     TIME_WAIT   
tcp        0      0 192.168.1.69:59324      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59236      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59370      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59472      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59328      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59448      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59284      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59454      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59428      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59344      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:45664      192.168.1.112:21        TIME_WAIT   
tcp        0      0 192.168.1.69:36300      192.168.1.112:60645     TIME_WAIT   
tcp        0      0 192.168.1.69:59356      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59348      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59256      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59394      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59312      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59230      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:45784      192.168.1.112:21        TIME_WAIT   
tcp        0      0 192.168.1.69:59320      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59444      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59280      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59262      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59246      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59272      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59470      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59392      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59464      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59334      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59306      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59254      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59452      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:45824      192.168.1.112:21        TIME_WAIT   
tcp        0      0 192.168.1.69:59352      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59242      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:45744      192.168.1.112:21        TIME_WAIT   
tcp        0      0 192.168.1.69:59278      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59408      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59332      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59238      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59274      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59410      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59468      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59228      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59372      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59436      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59234      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59350      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59288      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59232      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59434      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59400      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59416      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59276      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59430      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59414      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59252      192.168.1.105:5555      TIME_WAIT   
tcp        0    396 192.168.1.69:22         192.168.1.178:53396     ESTABLISHED 
tcp        0      0 192.168.1.69:59368      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59268      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:45864      192.168.1.112:21        TIME_WAIT   
tcp        0      0 192.168.1.69:59360      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59314      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59466      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:50368      192.168.1.112:52390     TIME_WAIT   
tcp        0      0 192.168.1.69:59244      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59366      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59354      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59282      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59292      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59424      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:22         192.168.1.178:53440     ESTABLISHED 
tcp        0      0 192.168.1.69:59380      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59302      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59404      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59402      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59318      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59474      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59446      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59308      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59386      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59384      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:35036      192.168.1.112:44052     TIME_WAIT   
tcp        0      0 192.168.1.69:59406      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59326      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59266      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59432      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59450      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59330      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59440      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59364      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59358      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59264      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59460      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59398      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59310      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59362      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59316      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59322      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59342      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59376      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59422      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59346      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59456      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59304      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59426      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59442      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59296      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:47520      192.168.1.112:17454     TIME_WAIT   
tcp        0      0 192.168.1.69:59388      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59248      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59390      192.168.1.105:5555      TIME_WAIT   
tcp        0      0 192.168.1.69:59396      以上是关于linux netstat(网络信息统计) 工具说明及使用方法(检验本机各端口的网络连接情况,显示网络连接路由表网络接口)的主要内容,如果未能解决你的问题,请参考以下文章

如何检查 Linux 中的开放端口列表?

Linux netstat 命令详解

Linux netstat 命令详解

Linux netstat 命令详解

Linux netstat 命令详解

Linux命令Linux下 netstat的使用