1.通过监听端口号,获取pid
command: netstat -ntlp | grep 2181
output:
(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:2181 0.0.0.0:* LISTEN 28412/java
2.pid查看process信息
ps -aux | grep 28412