SRCDS Steam group


Stop a server if empty
#1
Firsty, sorry if this is the wrong section of the forum, its possibly more towards a Windows System, but others may be able to help.

BASIC INFO
Server OS: Windows Server 2008 64bit
Processor: Intel Core i3 540 - 2.93ghz
Ram: 4GB
Game(s): Counter-Strike Source / OB Based Servers

^Included the above info, incase it helps^

Ok so basically, I want to create or use a system that will check say every 15 minutes to see if the server is empty, if so, shutdown the server.

I know this sounds like an odd request, but these are match servers, so they dont need to be on 24/7.

Is there any current system that currently does this? I know some server hosts do provide it, but I cant work out how.

Any ideas?

Again apologies if this is the incorrect forum.
Reply
#2
Well. I've got ideas for a similar one. Use a cronjob to call a script which does the "rcon status" to the servers, if empty then call a script which does kill "pid" (linux box)
Reply
#3
(07-19-2011, 02:16 AM)michael_sj123 Wrote:  Well. I've got ideas for a similar one. Use a cronjob to call a script which does the "rcon status" to the servers, if empty then call a script which does kill "pid" (linux box)

Yea, I like that idea, it shouldnt be to hard to setup on a windows system, just working out how to query the server, also, as most of mine run a TV server.

So same principle but just if users > 1.
Reply
#4
Hm.. There should be something that can be used. Maybe a php script which echoes the output and some taskmanager thing which reads it now and then.. dunno
Reply
#5
Well I mean are you attempting to do? Once you get the server shut down for inactivity will you have to login to somewhere and tell the server to start back up manually? I mean inactive SRCDS servers basically sit at 0% cpu and only hold like 300MB of ram.
Game Servers -- CentralFrag.com -- Use promocode "frag" for 15% off every month!
Reply
#6
^ Yeah, it's just easier to leave it alone. It uses almost no resources.
Ryan White
Owner & CEO
GigabiteServers.com
Reply
#7
I know SpeedGaming.pro's got something like that. An inactivity timer. If there are no players on the server in 15 mins it autoshutdowns it and you have to login and use some start button to start it again.
Reply
#8
I can make it for you, in SourcePawn, very simple..
[Image: b_350_20_692108_381007_FFFFFF_000000.png]
I only have 1 server Sad
Attack2
Reply
#9
If you want to have a go at making a system, that would be great Smile
Reply
#10
If they are matchservers they shouldn't have SourceMod imo..
Reply
#11
They dont have any mods, other than Zblock.

So that wont be an option Sad
Reply
#12
What about starting the server back up? Would that be manual or would you want the shutdown script to sent a time to run the starting script?
~ Mooga ...w00t? - SRCDS.com on Twitter
[Image: 76561197965445574.png]
Please do not PM me for server related help
fqdn Wrote:if you've seen the any of the matrix movies, a game server is not all that different. it runs a version of the game that handles the entire world for each client connected. that's the 2 sentence explanation.
Reply
#13
Starting it up again isnt an issue, its just making sure that no server is turned off with players on it,

ie. System that shutsdown after checking playercount
Reply
#14
I mean there are plenty of ways you can do it, just how you go about doing it is up to you.

I mean you can write a php script that will do a RCON status and parse out the response and then if there are 0 players to kill the server. Basically whatever language your comfortable writing in will be your best choice.
Game Servers -- CentralFrag.com -- Use promocode "frag" for 15% off every month!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)