How to check a process whether it is hung

Microsoft Windows server 2003 enterprise
December 22, 2010 at 11:13:33
Specs: Windows 2003 Enterprise
HI All,

I want to create a script by which I can find out the hung process in WINDOWS 2003.
Need to monitor a specific process. also if it got hung then we should get some kind of log in windows event logs.

Please help me in this.

Regards,
Gaurav.


See More: How to check a process whether it is hung

Report •

#1
December 22, 2010 at 11:38:24
Does the process in question (actually one of it's threads) own a window?
If not there is no reliable and general way to determine if the process is hung.
If it does own a window the only method supported by Microsoft is to send it a message with the "SendMessageTimeout()" message and wait for the return. Your scripting language would have to support sending messages.
http://msdn.microsoft.com/en-us/library/ms644952(VS.85).aspx

Windows does not do any logging of hung processes but there is nothing to prevent an application from doing this.


Report •

#2
December 22, 2010 at 12:00:39
Hi LMiller7,

Actully we have installed some software in that WINDOWS 2003 box (Its a production box) and some times its process got hung, So I need to monitor that process countinously, and need to work if that process got hung.

It will be good if you can suggest/ Provide for any script (Batch script/ VB Script)

Regards,
Gaurav


Report •
Related Solutions


Ask Question