I have been managing a Counter-Strike: Source server for nearly a year and believe me, it is a very sensitive and buggy server to maintain. Am fost gestionarea unui Counter-Strike: serverul sursă pentru aproape un an şi crede-mă, acesta este un server foarte sensibil şi de buggy pentru a menţine. Buggy in the sense that it crashes nearly everyday especially when you are running intensive mods such as ZombieMod or Garry's Mod. Buggy, în sensul că se avariază aproape de zi cu zi mai ales atunci când se execută Mods intensive, cum ar fi ZombieMod sau Mod Garry's. Moreover there are hundreds of third party plugins for SourceMod and EventScripts which makes it even more unstable because of incompatibility problems. Mai mult decât atât, există sute de plugin-uri terţă parte pentru SourceMod şi EventScripts care o face chiar mai instabil din cauza problemelor de incompatibilitate. It is not easy and time consuming to debug and find out what is causing the crash. Nu este uşor şi consumatoare de timp pentru a depana şi de a afla ce este cauza accidentului. So it is important to be able to auto restart the server when the srcds crashes. Deci, este important să fi capabil la spre auto reporni server, atunci când se blochează srcds.

If you are running a CSS server on linux, the server itself already supports auto restarting srcds when crash. Dacă rulaţi un server de CSS pe Linux, server-ul în sine deja sprijină auto reînceperea srcds atunci când accident. However on Windows, you can do it via a batch file. Cu toate acestea pe Windows, o poti face prin intermediul unui fisier lot. It works but it has its problems in doing that which I'll explain further. It works dar are probleme în a face ceea ce voi explica în continuare.

This is the batch file that you need to run to keep srcds.exe open by automatically running when crashed or closed. Aceasta este batch dosar that tu nevoie la spre a alerga să păstreze srcds.exe de a deschide automat atunci când rulează prabusit sau închis.

@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

The command above will monitor for srcds.exe and immediately auto runs the command line if it's not running. Comanda de mai sus va monitoriza pentru srcds.exe şi imediat Auto rulează în linie de comandă dacă nu este să fie difuzate. Well Valve recommends that we should wait for at least 10 seconds before restarting so that there is enough time for the memory to clear up. Ei bine Valve recomandă ca ar trebui sa asteptam pentru cel puţin 10 secunde înainte de a reporni, astfel că nu este suficient timp pentru memorie pentru a clarifica. I've used this batch and noticed that there were a few times the server crashes, restart, crashes again and restart. Am folosit acest lot şi am observat că au existat de câteva ori accidente de server, pauzã, accidente din nou şi reporniţi. Previously I've written an Anterior, am scris o article article that contains a couple of free tools that can auto rerun program when closed but this time I needed something different. care conţine o serie de instrumente gratuite care pot automată a programelor executaţi din nou, când este închis, dar de data aceasta am nevoie de ceva diferit.

I was looking for a free, small, simple and portable tool that can monitor for a specific process and then run a “different” file when it detects a crash. I was privire pentru un drum liber, mic instrument, simplu şi portabil, care poate monitoriza pentru un proces specific şi apoi executaţi un fişier "diferite" atunci când detectează un accident. I found Restart on Crash which has been working perfectly ever since I started using it. Am găsit pe Repornire Crash care a fost de lucru perfect de când am început folosind-o. Restart on Crash is an monitoring tool that will watch the applications that you specify and automatically relaunch any program that hangs or crashes. Reporniţi pe Crash este un instrument de monitorizare, care va viziona aplicaţiile pe care le specificaţi în mod automat şi relansarea orice program care se blochează sau se blochează. You can add any number of applications to monitor, enable/disable them individually and edit the command line that will be used to restart an application. Puteţi adăuga orice număr de cereri pentru a monitoriza, activaţi / dezactivaţi-le în mod individual şi edita linie de comandă care va fi folosit pentru a reporni o cerere. Restart on Crash doesn't require installation and stores all it's configuration data in a “settings.ini” file in the program's folder, so it's portable. Reporniţi pe Crash nu necesită instalare şi stochează toate datele de configurare este într-o settings.ini "" fişierul în folderul programului, deci este portabil. It should be compatible with most NT-based Windows versions. Aceasta ar trebui să fie compatibil cu cele mai multe NT-bazate pe versiunile de Windows.

Basically the below image is the settings for the srcds server. Practic este imaginea de mai jos setările pentru serverul de srcds. It monitors srcds.exe and when it isn't running, a run.bat file will be executed. Acesta monitorizează srcds.exe şi atunci când nu este în execuţie, un fişier run.bat va fi executat.
Reporniţi pe Crash

The more interesting part is the run.bat which is executed when the program detected that srcds.exe is not running. Partea mai interesanta este run.bat care este executat atunci când programul descoperit că srcds.exe nu se execută. Since it is a batch file, I can program it to run multiple commands. Deoarece este un fişier batch, pot program să se execute mai multe comenzi.
a alerga program atunci când crash
The first command shows that I ping localhost 3 times. Prima comandă arată că am ping localhost de 3 ori. This command is being used as a feature to wait for 3 seconds before going to the second command. Această comandă este folosită ca o caracteristică să aştepte timp de 3 secunde înainte de a merge la comanda a doua. The second command from the batch file is to execute Comanda doilea din fişier batch este de a executa CleanMem CleanMem which is a tool to clean process and file cache to recover even more memory and performance. , care este un instrument pentru a curăţa de proces şi pentru a recupera de fişiere cache-ul de memorie, chiar mai mult şi de performanţă. Then again pause for 10 seconds before running srcds.exe with the full command line. Apoi, din nou pauză de 10 secunde înainte de a rula srcds.exe cu linia de comanda deplină. This method has been working perfectly for weeks already and I didn't need any other more advanced crash recovery software such as Firedaemon that cost money. Această metodă de lucru a fost perfect pentru săptămâna deja şi nu am nevoie de orice alt software de accident de mai avansate de recuperare, cum ar fi Firedaemon care costa bani.

[ [ Download Restart on Crash Download Reporniţi pe Crash ] ]

Technorati Tags: Technorati Tags: , , , , , , , ,