HeavensGate / Eternal

Heaven's Gate Station's homebrew based on Baystation12 ( https://github.com/Baystation12/Baystation12 ) //
http://forums.hgstation.xyz/
Other
3 stars 15 forks source link

Server restart script #24

Open woothie opened 9 years ago

woothie commented 9 years ago

We need a server-side script that checks if the server is alive every five minutes or so, and restarts it if it is not. Bonus points if you can make it log the CPU usage and force-close it if CPU is above 90% over the course of three checks (equal to 15 minutes), meaning the server is stuck and then restart it (maybe check if restart was successfull even). Add to Crontab or ask Woothie to add it to Crontab.

Davnik commented 8 years ago

Bump. Maybe every two minutes, the players are impatient sorts.

staticcharged commented 8 years ago

Bump. This needs to be done.

Davnik commented 8 years ago

We. Don't. Do. Linux. Yet our server experiences anywhere from 2 to 48 hours of completely solid downtime, anytime it hiccups and we don't have an understanding of Linux. Meaning, this is just that high of a priority.

Anyone who knows how to BYOND server is welcome to explain how someone would write a restart script, and private message it to Woothie. Yes please.

woothie commented 8 years ago

Monit could be our salvation, at least for server upkeep: https://mmonit.com/monit/ Meanwhile, I've seen Bay implement some scripts that could contain functions for what I'm looking for (wait until round-end, for instance) for this script. Note that these scripts will cover basic server (note: GAME server, as in the byond server. Not the actual server) operation, not complicated issues, or anything beyond "whoops I'm halted and using all the CPU but not actually dead lol" tbh. Google will be your only saviour if it scales beyond that.