none
Service Hung State

    Question

  • Hi

    Can  we monitor any windows service for a hung state? I created a monitor to monitor the service for stopped state.
    If we can monitor for a hung state please send me the procedure

    Regards
    Donald D'souza
    Thursday, February 18, 2010 5:14 PM

Answers

  • I'm not sure there exists a solution that will work for every service. The service needs to provide some indication that it is alive. There could be a way to run some simple transaction against your service that would tell you if it's processing requests or not. In that case, your script would be responsible for running that transaction. If your service uses a perf counter, the solution might be a little different. If your service has some other mechanism of detecting whether it's alive or not, the solution will be even different.

    It's difficult to say without having more information.
    This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
    Thursday, February 18, 2010 7:07 PM

All replies

  • Hi,
    I would do that with a script or I would try to find another way to monitor the same service, so not only the service state, also a process or a performance counter to decide if the service is running.
    Anders Bengtsson | Microsoft MVP - Operations Manager | http://www.contoso.se
    Thursday, February 18, 2010 5:58 PM
    Moderator
  • Hi Anders

    Can you send me the script to monitor the hung service to my email id: dsouza.donald07@gmail.com

    Regards
    Donald D'souza
    Thursday, February 18, 2010 6:57 PM
  • I'm not sure there exists a solution that will work for every service. The service needs to provide some indication that it is alive. There could be a way to run some simple transaction against your service that would tell you if it's processing requests or not. In that case, your script would be responsible for running that transaction. If your service uses a perf counter, the solution might be a little different. If your service has some other mechanism of detecting whether it's alive or not, the solution will be even different.

    It's difficult to say without having more information.
    This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
    Thursday, February 18, 2010 7:07 PM