1,查看使用指定端口的進程
lsof -i TCP:9001
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
java 11704 webroot 74u IPv6 3655631084 TCP *:etlservicemgr (LISTEN)
2,查看指定名字的進程
ps -ef | grep nginx
root 500 32426 0 12:31 pts/0 00:00:00 grep nginx
root 9483 1 0 11:12 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
nobody 9484 9483 0 11:12 ? 00:00:00 nginx: worker process
nobody 9485 9483 0 11:12 ? 00:00:00 nginx: worker process
nobody 9486 9483 0 11:12 ? 00:00:00 nginx: worker process