How do i check the nginx processes running?
-
The processes are checked by running:
$ systemctl status nginx ● nginx.service - nginx - high performance web server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2019-01-13 12:42:27 GMT; 7h ago Docs: http://nginx.org/en/docs/ Process: 8604 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS) Main PID: 8605 (nginx) Tasks: 2 (limit: 4915) CGroup: /system.slice/nginx.service ├─8605 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf └─8606 nginx: worker process Jan 13 12:42:27 training1-vm systemd[1]: Starting nginx - high performance web server... Jan 13 12:42:27 training1-vm systemd[1]: Started nginx - high performance web server.
Towards the end of the output you see processes 8605 the master process that runs as root user.
This invokes the worker processes, in this case just 8606, this process runs as the user/group defined in the configuration.
If you do a ps -ef | grep nginx, you will see the same processes:
$ root 8605 1 0 17:12 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf nginx 8606 8605 0 17:12 ? 00:00:00 nginx: worker process
© Lightnetics 2024