SRCDS Steam group


Automatic Restart
#1
Does anyone know of anything that can automatically restart my server every day? I have horrible memory leak with my server because I have only 160mb of RAM in the server. I don't want to have to restart my server every day and would just like for it to restart automatically.
Reply
#2
wow, may I ask what OS you are using? That's REAL low RAM you got there, most OS use more just running without any applications.

If you are running windows theres a task scheduler, just google it and you should find it. I believfe that's what you are looking for.
Join the Source Dedicated Server Support Group on Steam Community!
Source Dedicated Server (SRCDS)
Free to join, Live support! (When available)

http://forums.srcds.com/viewtopic/5114
Reply
#3
Yea, I run it on windows. After I built a decent computer for my grandparents, I grabbed their old one and ran it as a server. I was surprised at the amount of RAM it had (160mb!). But, it works fine for what it does. I've turned off every service that I could and only run the bare necessities. The only problem is that it basically runs on the page file and I get horrible memory leak. Soon, I'll build a decent setup for the server.

I know about the task scheduler and will look into that.
Reply
#4
I just wrote a simple bat file to restart the server every 10 hours.
Code:
@echo off
cls
title CSS Restarter
echo This program restarts the server every 10 hours.
:start
echo   Restarting the CSS server in 10 hours.
wait 36000
pskill srcds.exe
echo   Restarted.
goto start
If you have xp home, you have to download wait and put it into your windows/system32 folder. Also, pskill has to be placed in system32.
http://www.microsoft.com/technet/sysinternals/utilities/pskill.mspx

You can also use taskkill, but I have xp home on my server so it was not included. You can change the wait to whatever time you want. It is in seconds.

It works only when you are also running the restart batch file.
Code:
@echo off
cls
echo Protecting srcds from crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title srcds.com Watchdog
:srcds
echo (%time%) srcds started.
start /wait srcds.exe -console -game cstrike +map de_dust +maxplayers 16
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds

You could combine them and just add the start line right after the kill line but the server would not restart if it crashed. It would look like this:

Code:
@echo off
cls
title CSS Restarter
echo This program restarts the server every 10 hours.
:start
echo   Restarting the CSS server in 10 hours.
wait 36000
pskill srcds.exe
start srcds.exe -console -game cstrike +map de_dust +maxplayers 16
echo   Restarted.
goto start
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)