Home > linux > How do tell whether is a service/daemon is managed by System V Init scripts or upstart?

How do tell whether is a service/daemon is managed by System V Init scripts or upstart?

March 13Hits:0
Advertisement

I understand that Ubuntu derivatives support System V, which some consider the old method of starting services for a specifc runlevel and upstart however how do I tell whether a service or daemon is managed by scripts started by init or upstart. Do the commands service --status-all and initctl list convey these or is there a single command that would tell me so?

Answers

When you run ps, one of the fields is ppid. You can use that to track it to its parent (the pid will match the process's ppid). Just track it back recursively. (You could probably script it with ps and awk)

or if you prefer a graphical way

ps -ely --forest

or just see if it is in /etc/init.d/* or /etc/rc.d/*

grep <something> /etc/*.d/*

Tags:linux, ubuntu

Related Articles

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.683 s.