Page 1 of 1
Process Killer
Posted: Wed Aug 13, 2008 3:54 pm
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
Posted: Wed Aug 13, 2008 4:36 pm
by Cuda68
Task Manager does not work?
Posted: Wed Aug 13, 2008 4:40 pm
by Krom
He wants something that does it automatically.
Posted: Wed Aug 13, 2008 5:42 pm
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.
Posted: Thu Aug 14, 2008 9:19 am
by BUBBALOU
what game are you running anyway
Posted: Thu Aug 14, 2008 9:53 am
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
Posted: Thu Aug 14, 2008 10:40 am
by heftig
Maybe this will work. I hope it terminates non-GUI applications as well.
http://www.technospot.net/blogs/how-to- ... indows-xp/
Posted: Thu Aug 14, 2008 10:53 am
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
Posted: Thu Aug 14, 2008 11:13 am
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.
Posted: Sat Aug 16, 2008 6:38 pm
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.