如下:

查询监听LISTENING的端口1027

netstat -navo|find /i "listen"|find /i ":1027"

结果如下(最后一列是进程id):

C:\Users\Administrator>netstat -navo|find /i "listen"|find /i ":1027"
  TCP    0.0.0.0:1027           0.0.0.0:0              LISTENING       888
  TCP    [::]:1027              [::]:0                 LISTENING       888

 

查询连接状态ESTABLISHED的进程

例如:查询连接到mysql数据库3306端口的进程

C:\Users\Administrator>netstat -navo|find /i "ESTABLISHED"|find /i ":3306"
  TCP    127.0.0.1:3306         127.0.0.1:7140         ESTABLISHED     1644
  TCP    127.0.0.1:7140         127.0.0.1:3306         ESTABLISHED     8076

 

相关文章:

  • 2022-12-23
  • 2021-06-26
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2021-04-05
  • 2021-11-20
  • 2022-12-23
猜你喜欢
  • 2021-11-18
  • 2021-06-15
  • 2021-10-20
  • 2022-12-23
  • 2021-11-18
  • 2021-12-25
  • 2021-08-24
相关资源
相似解决方案