How to kill particular hanging process

Monopoly money comes in many flavors: 7, Vista, XP, 2K, ME, 98, etc.

Moderators: Flying Fox, Ryu Connor

How to kill particular hanging process

Postposted on Thu Jan 06, 2011 12:04 pm

My office has 12 terminal servers in a mini cloud. They are running Server 2003. There is a particular HP driver which gets loaded for some users' printers. It loads msiexec, which hangs. It doesn't bring the server down or anything (4 cores available so it just shows 24-25%), but it stops any other printers from being loaded by other users. When we see it, we kill it and subsequent printers load just fine. However, with 12 servers and 150-180 or so users connecting and disconnecting, it's impossible to keep an eye on each server for this little bugger.

What I'd like is a daemon/process monitor that would specifically look at msiexec and if it is at >50% CPU usage for more than 10 seconds, kill it.

I started poking at PSAPI, but it's a bit above my head.

Any thoughts?
mac_h8r1.postCount++;
Chaos reigns within. Reflect, repent, and reboot. Order shall return.
Slivovitz owns you.
mac_h8r1
Minister of Gerbil Affairs
 
Posts: 2962
Joined: Tue Sep 24, 2002 6:57 pm
Location: Alpha Epsilon Pi for life

Re: How to kill particular hanging process

Postposted on Mon Jan 10, 2011 5:34 pm

I used an auto-process killer once to stop a virus from loading a big exe every time it was killed so I could wipe the thing out, but triggering based on CPU % and duration will probably require something custom.

I found this on Google, but I have never used it myself:
4- Taskkill batch file/Command Line

There’s a Windows command called Taskkill which is used to terminate processes. Simply create a shortcut with the following command:

taskkill.exe /f /fi “status eq not responding”

You can also download this shortcut from the following location and use it from wherever you want.

Task Kill Shortcut (77.0 KiB, 2,428 hits)


Here's the MS Docs.

http://www.microsoft.com/resources/docu ... x?mfr=true

The question is whether the "not responding" would = 10 seconds @ 50% criteria, or something similar. No experience with this myself, maybe someone else does.
Matter is merely energy condensed to a slow vibration, we are all one consciousness experiencing itself subjectively, there is no such thing as death, life is only a dream, and we are the imagination of ourselves... back to you with the weather, Bob!
computron9000
Minister of Gerbil Affairs
 
Posts: 2416
Joined: Sun Oct 16, 2005 7:21 pm

Re: How to kill particular hanging process

Postposted on Mon Jan 10, 2011 6:34 pm

"Welcome back my friends to the show that never ends. We're so glad you could attend. Come inside! Come inside!"
Ryu Connor
Global Moderator
Gold subscriber
 
 
Posts: 3537
Joined: Thu Dec 27, 2001 7:00 pm
Location: Marietta, GA

Re: How to kill particular hanging process

Postposted on Fri Jan 14, 2011 11:23 am

Process Lasso, might help you.
mackintire
Gerbil
 
Posts: 18
Joined: Wed Jan 17, 2007 4:23 pm


Return to Windows

Who is online

Users browsing this forum: Bing [Bot] and 3 guests