Spotting Crashed Application
Tim Golden
mail at timgolden.me.uk
Wed May 16 02:28:53 EDT 2007
Steve Holden wrote:
>> Robert Rawlins - Think Blue wrote:
>> I’ve got an application that I’ve written, and it sits in an embedded
>> system, from time to time the application will crash, I’m not quite sure
>> what’s causing this, but as we test it more and more we’ll grasp a
>> better understanding and fix the issues.
>> However, until then I need a quick solution which can spot the crash and
>> reboot the system.
>>
> I don't know of any pre-written functionality, but I'd recommend using a
> UDP socket for this. Let your application send a packet (say) every 30
> seconds and have the monitoring application restart it if it doesn't
> hear a packet for 90 seconds.
Strange. I can't see the original message to which Steve's
replying, either on Google Groups or in my mailbox. Still...
I second the UDP heartbeat suggestion. AFAICR there's a
recipe in the printed Cookbook (and presumably the online
one as well). An alternative *might* be to use WMI to watch
for Win32_Process events and then to reboot, but I suspect
WMI might not be available on an embedded system.
TJG
More information about the Python-list
mailing list