根据端口号查询进程pid,netstat -nptl


[admin@v125196084 bin]$ netstat -tlnp|grep 12200 
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:12200               0.0.0.0:*                   LISTEN      3903/java    

3903就是进程的pid

你可能感兴趣的:(根据端口号查询进程pid,netstat -nptl)