As of macOS 10.12.6 (not sure about earlier versions) it is possible to invoke: launchctl dumpstate
and you will get a wealth of information about all running processes
Look for <LABEL> = {
as the first line of info pertaining to that job
Here’s a one liner to get all the active daemons and their plist paths:
grep -B 1 -A 4 "active count = 1$" <<< "$(launchctl dumpstate)"
Update: Since 10.12 macOS has added other values so the grep -A n
has been increased to 4 lines