Process Killer

For system help, all hardware / software topics NOTE: use Coders Corner for all coders topics.

Moderators: Krom, Grendel

Post Reply
Private_Joker
DBB Ace
DBB Ace
Posts: 31
Joined: Tue Jun 17, 2008 6:10 am

Process Killer

Post by Private_Joker »

I'm running a game server that too frequently passes an error which causes the process to run my CPU (a 2.2 GHz AMD Athlon) to 100% usage, and stay there. During normal activity, the process only runs about 20%, and isn't a problem. I run a program called serverdoc (http://www.serverdoc.com) to restart the server after crashes, or whenever the process stops.
What I need is a way to kill the process when it gets to this frozen state. Once it's killed, serverdoc can revive it and I'll have nothing to worry about.

I've tried a couple progs--one called \"Process Tamer\" and the other \"Process Lasso\", but both of those only change the priority of an out-of-control process (defined by a certain % for some count of seconds). I need a prog that will KILL the process.

Any suggestions?

-Joker
Cuda68
DBB Captain
DBB Captain
Posts: 745
Joined: Mon Jul 09, 2001 2:01 am
Location: Denver, CO USA
Contact:

Post by Cuda68 »

Task Manager does not work?
User avatar
Krom
DBB Database Master
DBB Database Master
Posts: 16134
Joined: Sun Nov 29, 1998 3:01 am
Location: Camping the energy center. BTW, did you know you can have up to 100 characters in this location box?
Contact:

Post by Krom »

He wants something that does it automatically.
Cuda68
DBB Captain
DBB Captain
Posts: 745
Joined: Mon Jul 09, 2001 2:01 am
Location: Denver, CO USA
Contact:

Post by Cuda68 »

This one will kill a process by name or PID. If you use name it kills all instances of that name and its freeware.


Command Line Process Viewer/Killer/Suspender
for Windows NT/2000/XP


http://www.beyondlogic.org/solutions/pr ... ssutil.htm

and another one:

http://www2.alter.org.ua/en/soft/win/wkill/

and the built in taskkill

ILL

Remove a running process from memory.

Syntax
KILL [option] process_id
KILL [option] task_name
KILL [option] window_title

Option
-f Force process kill

Note: Kill -f basically just nukes the process from existence, potentially leaking a lot of memory and losing any data that the process hadn't committed to disk yet. It is there for worst case scenarios - when you absolutely must end the process now, and don't care whether proper cleanup gets done or not.

In WindowsXP, KILL is replaced with the superior TASKKILL - Allowing you to specify a remote computer, different user account etc - for more details run TASKKILL /?


any one of these can be scripted and run remotely if needed.
User avatar
BUBBALOU
DBB Benefactor
DBB Benefactor
Posts: 4198
Joined: Tue Aug 24, 1999 2:01 am
Location: Dallas Texas USA
Contact:

Post by BUBBALOU »

what game are you running anyway

I seem to have a better workout dodging your stupidity than attempting to grasp the weight of your intelligence.
Private_Joker
DBB Ace
DBB Ace
Posts: 31
Joined: Tue Jun 17, 2008 6:10 am

Post by Private_Joker »

Whoops, sorry I wasn't nearly clear enough. I need a program that will recognize the out-of-control process and automatically kill it. After that, serverdoc will automatically revive it, and I won't have to touch my server at all.

Process Tamer and Process Lasso define such processes by CPU usage % over some amount of time (e.g. 95% for 30 seconds). I want a prog just like that, but which will KILL the process instead of \"taming\" or \"lassoing\" it.

Bubba-- It's a server for a Half-Life mod called \"EntMod\", which is basically an interactive mapping utility that you can do with friends (similar to HL2 Garry's Mod). The nature of such a utility is that it crashes very frequently, hence the serverdoc. Most crashes just end the HLDS process, but this crash is special: when a map entity such as a weapon or gib accidentally enters a \"trigger_teleport\" entity, there's a chance that an error will cause the process to run my CPU up to 100% and stay there (sounds like an infinite loop, but I don't really know.) Anyway, I keep having to go to my server and manually ending the process when this happens, but I'd like a program to do it for me.

-Joker
User avatar
heftig
DBB Ace
DBB Ace
Posts: 138
Joined: Mon Jun 05, 2006 9:55 pm
Location: Germany
Contact:

Post by heftig »

Maybe this will work. I hope it terminates non-GUI applications as well.

http://www.technospot.net/blogs/how-to- ... indows-xp/
Private_Joker
DBB Ace
DBB Ace
Posts: 31
Joined: Tue Jun 17, 2008 6:10 am

Post by Private_Joker »

I think I tried that one already..it seems like Windows' definition of \"Hung\" for processes is not up to my standards--I think it only kills apps in certain contexts which don't seem to include CPU usage.

That is, Windows is not well hung.

-Joker
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw »

this really calls for some more advanced scripting. Like using grep. Outside of that, you might have to settle on restarting it periodically.

as for what windows considers non-responsive:if a program does not respond to a message from a specific process in a timely fashion, windows will consider it hung and ask to kill it.
User avatar
The Lion
DBB Ace
DBB Ace
Posts: 197
Joined: Mon Apr 17, 2006 2:13 pm
Location: The Netherlands

Post by The Lion »

If you can run the server under wine, a simple (no need for
\"advanced\" scripting IMO :)) script could poll the process
periodically and kill and restart the server if necessary.

If the server doesn't work with wine, and has only a windows
version, it might still be possible using cygwin; I'm not sure.
Post Reply