Monitoring hlds_run on Linux

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
tenub
A semi-regular
A semi-regular
Posts: 29
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Tue Aug 27, 2013 6:28 am

Monitoring hlds_run on Linux

Post by tenub »

I'm running four different hlds processes in different screens (on Debian). My problem is that randomly, 2-6 times throughout each day, one of them will "crash" and begin eating up a massive amount of cpu usage. I know that hlds on linux automatically restarts if the process is killed, but I need a way to monitor them. I looked into Monit but it seems you either need a path to the program or a path to a pid file or both in order to monitor. Is there a simple way I could monitor by process name and if a process is found to be using 90%+ CPU for 15+ seconds (for example) kill it (in which case it will auto-restart)? Thanks.
evil_master
A regular
A regular
Posts: 49
Joined: Fri Jun 17, 2011 3:57 pm

Re: Monitoring hlds_run on Linux

Post by evil_master »

When I had my linux VDS, I used a custom control panel to monitor my servers called ULTIMATE GAMESERVER CONTROL CENTER (UGCC) which did a very good job of monitoring my servers, I am not sure if it features cpu usage on linux (although this was about a year ago, so it might now) however, it sounds like the easier way to do this would be for you to use Monit (no idea what this is) as you DO have the path to the program (hlds_run is your program, if not, hlds_i686 or w/e is your program) and you can make hlds_run give you a pid file by setting +pidfile /path/for/pidfile.pid

Hope this helps!
Post Reply