了解netstat输出 [英] Understanding the netstat output

查看:57
本文介绍了了解netstat输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

tcp        0      0  :::111                      :::*                        LISTEN

上面是 netstat -nl |的输出.grep 111 ::: 111段的含义是什么?

Above is the output of netstat -nl | grep 111What is the meaning of :::111 segment?

推荐答案

technet.microsoft.com 表示:

显示活动的TCP连接,计算机所在的端口侦听,以太网统计信息,IP路由表,IPv4统计信息(用于IP,ICMP,TCP和UDP协议)和IPv6统计信息(用于IPv6,ICMPv6,IPv6上的TCP和IPv6协议上的UDP).用过的如果没有参数,netstat将显示活动的TCP连接.

Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Used without parameters, netstat displays active TCP connections.

因此,您可以找到正在使用和监听的地址和端口.例如,您要在端口 8080 上运行 Tomcat 服务器.但是它使用了.这样您就可以运行:

So you can find which addresses and ports are used and listening. for example you want to run a Tomcat server on port 8080. but it used. so you can run:

netstat -ano | find "8080"

输出将类似于:

 TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       1185
 TCP    [::]:8080              [::]:0                 LISTENING       1185

它表示进程号 1185 正在使用此端口.如果有必要使用此端口,则可以通过以下命令关闭使用该端口的应用程序并在其上运行服务器:

It says that process number 1185 is using this port. If it is necessary to use this port you can shutdown the app that use this port and run your server on it by this command:

taskkill /F /PID 1185

这篇关于了解netstat输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆