Hello guys, I'm looking to find a way how to identify a non responding (not zombie) process programatically. I find some information to check TH_STATE_UNINTERRUPTIBLE status but there was some discussion that it's not the right way. Any ideas?
+1
A:
I'm assuming you mean a spinning wheel application hang? There are many ways to freeze. The particular cause is important. If it's a Cocoa app, you could try sending your main thread / Window an event... or scripting up Spin Control.
Pestilence
2010-03-02 19:49:06
Hello,thanks for your reply. Unfortunately the process I'm trying to monitor is not my application but a commercial java application. It sometimes takes the whole CPU and stops accepting connections. My idea was to monitor it and when it stops responding restart it.
BobC
2010-03-02 19:57:56
In that case, can you schedule a background process to open a connection and "ping" the server? Probably also launching the Java app with a ulimit so it won't saturate the CPU when it does tank.
Pestilence
2010-03-03 00:30:25