Trying to resolve an ongoing effort to set up monitoring and automatic launches or reboots of Enterprise if it crashes, freezes or stalls with a dialog. I’ve worked out an AppleScript that does the job perfectly as long as I have the correct Unix process id assigned to the application: the pid.
The pid changes on every launch so I need to find a way to discover it. The AppleScript runs in a Panorama file that is using PostURL for monitoring Enterprise so I can also run shell scripts or anything else in order to get the current pid.
The pid is viewable in the Activity Monitor so there must be a way to acquire it, but - so far - that has evaded me. If anyone has ideas or suggestions…
When I get this worked out I intend to share the monitor with the community. We’ve all wanted it.
It should work with Pan Enterprise X too once it’s available.
It looks like the name you will need to use for Enterprise is Carbulator. Unfortunately, that will also give you the pid of any copy of Panorama you have running.
Panorama can monitor Panorama Enterprise and Enterprise can actually monitor Panorama the same way, so either will keep the other up and running with both set to run on startup. External monitoring systems can reboot the whole machine if Enterprise stays down, but to simply dodge a dialog or a crash quickly, this is my desired route.
I wasn’t very clear. Carbulator is the name you need to use with pgrep, and even with the long format, it doesn’t seem to give you enough information to tell Panorama from Enterprise. I installed a copy of Enterprise so that I could have them both running and this is what I get.
According to Activity Monitor, Panorama Server is 1410, and Panorama is 1386.
If Panorama and Enterprise are both running on the same user account, you should be able to use info("unixusername") in your shellscript command.