ps -ef --forest 展示子进程
[root@iZ239ja5s3zZ ~]# ps -ef --forest | grep nginx
root 8164 8113 0 11:38 pts/1 00:00:00 \_ grep --color=auto nginx
root 1466 1 0 Apr08 ? 00:00:00 nginx: master process /usr/sbin/nginx
nginx 24293 1466 0 Aug26 ? 00:11:32 \_ nginx: worker process
nginx 24294 1466 0 Aug26 ? 00:11:28 \_ nginx: worker process
nginx 24295 1466 0 Aug26 ? 00:11:23 \_ nginx: worker process
nginx 24296 1466 0 Aug26 ? 00:11:17 \_ nginx: worker process
nginx 24297 1466 0 Aug26 ? 00:11:29 \_ nginx: worker process
nginx 24298 1466 0 Aug26 ? 00:11:13 \_ nginx: worker process
nginx 24299 1466 0 Aug26 ? 00:11:20 \_ nginx: worker process
nginx 24300 1466 0 Aug26 ? 00:11:19 \_ nginx: worker process
查看端口号使用情况:
netstat -antlp | grep 50002