Query & restart if empty

Want a new feature, we want to know about it. Any and all suggestions are welcomed.
Post Reply
mdn
Posts: 4
Joined: Fri Jul 24, 2015 3:54 am

Query & restart if empty

Post by mdn »

Currently running a Rust server.

Issue: Last night the game server was online / running but players were not able to connect.

Purposed Solution: Using Brainless logs verify the last time server was started / stopped. If uptime is greater than X and population is less than Y, restart game service. First using graceful. Should it still not exit after Z seconds, force restart.

Example: Rust process was started 2 hours ago. Population according to query is 0. Restart after it's been empty for 10 minutes.

This could be used for other games where query is enabled to perform a (daily) restart when it's empty. The purpose of waiting 10 minutes before issuing the restart command is to ensure that the server is actually empty due to an issue and not simply because of a network issue causing the server to drop population for 1 or 2 minutes. If after 10 minutes players haven't reconnected the chances are high that either it's going to stay empty or there is an issue.

Thank you for your consideration. Being able to have our game servers run unattended for as long as possible would be great.
Masher
Site Admin
Posts: 3612
Joined: Thu Apr 20, 2006 2:54 pm
Location: America's Heartland
Contact:

Re: Query & restart if empty

Post by Masher »

You should be able to do this now with the automatic restart settings. Set the server to restart at 00:10 (or whatever time as long as the hour is 00), set the hourly restart to 1. Then set the min user count to 1. The panel will restart the server every hour if it's empty.
Masher
-----------
Please do not PM me unless asked to! We are a small company. If you have an issue or question it would be best to post it in the forums where it can help others in the future.

NEW Join our Discord!
mdn
Posts: 4
Joined: Fri Jul 24, 2015 3:54 am

Re: Query & restart if empty

Post by mdn »

Lovely, thank you.

I will mention that before I submitted this question I browsed several other threads to see what I could expect. I found that several of the feature requests were already implemented. At this point I then went through the software again to make sure my question didn't share the same fate. Bah. =(
Masher
Site Admin
Posts: 3612
Joined: Thu Apr 20, 2006 2:54 pm
Location: America's Heartland
Contact:

Re: Query & restart if empty

Post by Masher »

No problem. ;)
Masher
-----------
Please do not PM me unless asked to! We are a small company. If you have an issue or question it would be best to post it in the forums where it can help others in the future.

NEW Join our Discord!
Post Reply