1

I used the below command to list down all the daemons that are in a machine

/sbin/initctl list | awk '{ if ($1 == "tty") print $1" "$2; else print $1; }'

Now my next requirement is to get the daemons running path i.e command line.

For instance vmsd /usr/sbin/vmsd

So gave couple of tries using the ps aux command followed by the grep command but I am not getting the results as expected.

Can some one help me out with this?

  • 1
    If you can find the PID, use cat /proc/$pid/cmdline perhaps. – DopeGhoti Jan 27 '17 at 16:08
  • Happy to have helped! – DopeGhoti Feb 6 '17 at 16:10
1

As DopeGhoti answered in the comments:

If you can find the PID, use cat /proc/$pid/cmdline

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.