monitor an OF application for freezing or memory leaks

I am running an OF application that sometimes freezes, and I’m not sure why and I want the application to force-quit then relaunch if it freezes. It doesn’t crash, it just freezes.

Is there a way to monitor if there’s a memory leak , or if an application freezes or stops responding? Then ensure that the application force quits and restarts?

Of course figuring out why it’s freezing is going to be best, but from the console I haven’t yet been able to figure out when or why (it’s after many hours of running)

Blair-Neal posted an article the other day How-to-keep-an-installation-up-forever-–-Part-2 that walks through process monitoring and automatic restart, definitely give it a look for some ideas and recipes. If you are a Windows user, you might check out StayUp which is a great looking tool from Stephen-Schieberl.