objective c - OSX: Monitoring launchd, daemons and agents -


is there way can monitor launchd i.e. if job getting loaded or unloaded launchd daemon/agent list? instance can administrative app register receive event whenever new plist loaded or unloaded launchd daemon such firing command: launchctl load/unload /library/launchdaemons(or launchagents)/test.plist?

polling 1 option there resource efficient way?

any appreciable.

i'm not sure you're looking there's extremely powerful tool on osx called dtrace. can use see sorts of things happening on system , filter them wish e.g syscalls.

with specific scenario take @ dtruss easier use tool uses dtrace give information: https://developer.apple.com/library/mac/documentation/darwin/reference/manpages/man1/dtruss.1m.html should rather simple 'prompt' dtruss every time launchctl call made, i'm not sure information want out of call though.

dtrace has whole books written on how use , write signatures it. if can't need dtruss can little more.

also not these both command line tools, if you're looking programatic you'll have little more work ahead of you.


Comments