Command line for looking at specific port

前端 未结 13 1201
孤街浪徒
孤街浪徒 2020-12-02 03:40

Is there a way to examine the status of a specific port from the Windows command line? I know I can use netstat to examine all ports but netstat is slow and looking at a spe

相关标签:
13条回答
  • 2020-12-02 04:25

    Use the lsof command "lsof -i tcp:port #", here is an example.

    $ lsof -i tcp:1555 
    COMMAND   PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
    java    27330 john  121u  IPv4 36028819      0t0  TCP 10.10.10.1:58615->10.10.10.10:livelan (ESTABLISHED)
    java    27330 john  201u  IPv4 36018833      0t0  TCP 10.10.10.1:58586->10.10.10.10:livelan (ESTABLISHED)
    java    27330 john  264u  IPv4 36020018      0t0  TCP 10.10.10.1:58598->10.10.10.10:livelan (ESTABLISHED)
    java    27330 john  312u  IPv4 36058194      0t0  TCP 10.10.10.1:58826->10.10.10.10:livelan (ESTABLISHED)
    
    0 讨论(0)
提交回复
热议问题