When I'm running command ps aux | grep httpd , it shows that httpd is in running state, but on running systemctl status httpd - it's inactive and disabled. Why is it so?

  • note that running ps aux | grep httpd will show the grep process itself, because its args match httpd. Use either ps -C httpd or ps aux | grep '[h]ttpd' – cas Nov 5 '15 at 22:12
  • You could be running a third party version of httpd. If you do ps -C httpd -o etime,pid,args does it show a path to the executable that matches the regular path? – Bratchley May 12 '16 at 13:19

httpd is started manually by someone, out of control of the systemd service manager. This might be due to debugging purposes (ie. by starting httpd in the foreground).

From the manual:

systemctl - Control the systemd system and service manager

The ps command only lists processed which are started and systemctl lists which services are known and can be managed by systemd.

From the manual:

ps - report a snapshot of the current processes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.