Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer

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/*
share|improve this answer
Thanks. That allows me to trace it back to the parent process or daemon however how do I tell whether that process was started by init scripts or Upstart? – PeanutsMonkey Mar 14 '12 at 21:22
Updated answer with a couple alternatives. What does the ps -ely --forest output look like? – technosaurus Mar 14 '12 at 22:12
Thanks but that doesn't tell me whether it has been started by upstart or scripts in the etc/rc*.d folders. – PeanutsMonkey Mar 21 '12 at 7:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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