linux查看进程、端口

1 查看进程pid
ps -ef|grep tomcat

2 查看进程占用的端口
netstat -ntlp|grep pid

3 查看端口对应的进程号
lsof -i:portid