Simon icon Simon
Flexible server monitoring

Introducing Simon 5!

Simon version 5 is now available. It is a massive update, introducing a much-requested feature: syncing the Simon data between multiple Macs, plus a Simon Status service, a Link Checker filter, improved Find filter, iMessage and Speak Error notifiers, a new app icon, and much more.

Important: please note that Simon 5 requires a minimum of macOS 10.12 (Sierra), and is a paid upgrade from Simon 4. Purchasers since September 1, 2020 automatically get a version 5 license (that also works in previous versions).

Read the Simon What's New page for details.

Is Process Running Service

The Is App Running Service is limited to apps/processes which are running in the user context (or have a UI?) and I needed something which would monitor a root level process.

After messing around with ps, I came up with following AppleScript which is a drop-in replacement for Is App Running:

do shell script "ps -axo comm | grep {Application}"
return 0
on error
return 1
end try

However in testing I am getting a very small number of false positives - this is returning 0 when the process is not running about 5% of the time. Running the ps from the command line I can't reproduce this...

Does anyone have any improvements to the command, or a better way to test if a root level process is running.

David Sinclair's picture

Re: Is Process Running Service

Maybe putting the app name in single quotes (around the variable) might help?

Someone else might bbe able to offer some more helpful advice, though.