How to control the process on OS X?

Iโ€™m looking for a way to monitor the status of one of my applications in OS X. There are several components that I need to monitor, for example, the status of various communication channels. If they decrease, the monitoring process should be able to warn the user both on the screen and through a push notification.

XPC services look promising, but if the application crashes, I assume this will also exit the service, or am I mistaken?

My preferred solution is that it also keeps track of an unexpected shutdown and restarts the application if that happens.

What is the best way to do this?

+5
source share
4 answers

, .. (). , , .

, Apple Technical Q & :
TN2050:

+2

, Launchd CrashReporter .

Launchd OS X, XPC. ( KeepAlive/SuccessfulExit )

Launchd , , .

CrashReporter - OS X, . AppleSystemLogger syslog, TechNote. Mountain Lion ~/Library/DiagnosticReports/, crashlog plist .

, , launchd xpc, , ,

, , (, QueueDirectories) .

+1

, , , . A script, ps , .

Here you can see the various options here . See, -Cfor example, to select by command name and -mto display all streams.

0
source

All Articles