When a Windows process just won’t die

I have a script that I use to monitor disk space usage on some of my Windows servers and occasionally they stop working after a reboot. The service is in the ‘Started’ state but Nagios cannot connect to it for whatever reason.

Usually, restarting the service fixes the issue. Most of the time, however, the service will throw an error when I try to stop it. I don’t pretend to know every trick in the book, but as far as I can tell the only way to restart the service at this point is to reboot the server. I’m not aware of any Microsoft tools that will let me forcefully kill the service.

There is, however, a Sysinternals tool that works perfectly for this: Process Explorer.

Using this tool I can right-click on the process, select Kill Process, and immediately the service disappears from the list.

Then I can drop to a Dos shell and start the service.

WordPress database error: [Table 'wp_comments' is marked as crashed and should be repaired]
SELECT * FROM wp_comments WHERE comment_post_ID = '333' AND comment_approved = '1' ORDER BY comment_date

Leave a Reply