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. मैंने किया गया है एक काउंटर हड़ताल: करीब एक साल के लिए स्रोत सर्वर के प्रबंध और मुझे विश्वास है, यह एक बहुत ही संवेदनशील और छोटी गाड़ी सर्वर को बनाए रखना है. Buggy in the sense that it crashes nearly everyday especially when you are running intensive mods such as ZombieMod or Garry's Mod. अर्थ है कि यह विशेष रूप से लगभग हर रोज़, जब तुम ऐसी ZombieMod या गैरी मॉड के रूप में गहन mods चल रहे हैं दुर्घटनाओं में छोटी गाड़ी. Moreover there are hundreds of third party plugins for SourceMod and EventScripts which makes it even more unstable because of incompatibility problems. इसके अलावा वहाँ SourceMod और EventScripts जो भी वजह से असंगति समस्याओं के अधिक अस्थिर बनाता है के लिए तीसरे पक्ष के plugins के सैकड़ों रहे हैं. It is not easy and time consuming to debug and find out what is causing the crash. यह आसान नहीं लेने का समय है और डिबग और पता क्या दुर्घटना के कारण है. So it is important to be able to auto restart the server when the srcds crashes. तो यह करने में सक्षम होना ज़रूरी है ऑटो के सर्वर को पुनः आरंभ जब srcds दुर्घटनाओं.

If you are running a CSS server on linux, the server itself already supports auto restarting srcds when crash. यदि आप लिनक्स पर सीएसएस सर्वर चल रहे हैं, सर्वर ही पहले से ही समर्थन करता है ऑटो srcds जब दुर्घटना शुरु. However on Windows, you can do it via a batch file. विंडोज पर फिर भी, आप इसे एक बैच फ़ाइल के जरिए कर सकते हैं. It works but it has its problems in doing that which I'll explain further. यह काम करता है लेकिन यह करने में अपनी समस्याएं है जो मैं आगे समझाता हूँ.

This is the batch file that you need to run to keep srcds.exe open by automatically running when crashed or closed. इस बैच फ़ाइल है कि आप को चलाने की जरूरत है रखना है srcds.exe खुले स्वचालित रूप से चल रहे जब दुर्घटनाग्रस्त हो जाने या बंद हैं.

@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. कमांड ऊपर srcds.exe पर नजर रखने के लिए और तुरंत ऑटो करेगा कमांड अगर यह नहीं चल रहा है लाइन चलाता है. 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. खैर वाल्व की सिफारिश की है कि हम कम से कम 10 सेकंड के लिए बहुत शुरु कि स्मृति के लिए पर्याप्त समय तक स्पष्ट है पहले रुकना चाहिए. I've used this batch and noticed that there were a few times the server crashes, restart, crashes again and restart. मैं इस बैच का उपयोग किया है और पाया है कि वहाँ कुछ समय दुर्घटनाओं सर्वर पुनः आरंभ, दुर्घटनाओं और फिर पुनः आरंभ किया गया. Previously I've written an पहले मैं एक प्रश्न के लिखित है article लेख that contains a couple of free tools that can auto rerun program when closed but this time I needed something different. कि मुफ़्त उपकरण की एक जोड़ी है कि ऑटो फिर से दौड़ना कार्यक्रम कर सकते हैं जब बंद कर दिया लेकिन इस बार मैं कुछ अलग करना जरूरी होता है.

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 found Restart on Crash which has been working perfectly ever since I started using it. मैं क्रैश पर Restart पाया गया है, जो पूरी तरह से कभी काम के बाद से मैं इसे का उपयोग शुरू कर दिया. Restart on Crash is an monitoring tool that will watch the applications that you specify and automatically relaunch any program that hangs or crashes. दुर्घटना पर Restart एक निगरानी उपकरण है कि अनुप्रयोगों कि आपके द्वारा निर्दिष्ट और स्वचालित रूप से किसी भी प्रोग्राम है जो लटक या दुर्घटनाओं relaunch देखेंगे है. 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. आप किसी भी अनुप्रयोग की संख्या जोड़ने के लिए देखरेख, सक्षम करें / निष्क्रिय कर देते हैं और उन्हें व्यक्तिगत रूप से कमांड लाइन को संपादित करने के लिए कि एक आवेदन को पुनः आरंभ कर सकते हैं का उपयोग किया जाएगा. 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. दुर्घटना पर Restart स्थापना और दुकानों सब एक settings.ini "में विन्यास डेटा" कार्यक्रम फ़ोल्डर में फ़ाइल है, तो यह पोर्टेबल है की आवश्यकता नहीं है. It should be compatible with most NT-based Windows versions. यह सबसे NT के साथ संगत-Windows संस्करण पर आधारित होना चाहिए.

Basically the below image is the settings for the srcds server. मूल रूप से छवि नीचे srcds सर्वर के लिए सेटिंग्स है. It monitors srcds.exe and when it isn't running, a run.bat file will be executed. यह srcds.exe और जब वह नहीं चल रहे एक run.bat फ़ाइल मार डाला जाएगा है पर नज़र रखता है.
दुर्घटना पर Restart

The more interesting part is the run.bat which is executed when the program detected that srcds.exe is not running. अधिक दिलचस्प हिस्सा run.bat जो मार डाला है, जब कि कार्यक्रम srcds.exe का पता नहीं चल रहा है. Since it is a batch file, I can program it to run multiple commands. चूंकि यह एक बैच फ़ाइल है, मैं इसे कई कमांड चलाने के लिए कार्यक्रम कर सकते हैं.
कार्यक्रम चला जब दुर्घटना
The first command shows that I ping localhost 3 times. पहली कमान पता चलता है कि मैं लोकलहोस्ट पिंग 3 बार. This command is being used as a feature to wait for 3 seconds before going to the second command. इस कमान के एक फीचर के रूप में इस्तेमाल किया जा रहा है दूसरी कमांड में जाने से पहले 3 सेकेंड के लिए रुको. The second command from the batch file is to execute बैच फ़ाइल से दूसरी कमान के लिए लागू है CleanMem CleanMem which is a tool to clean process and file cache to recover even more memory and performance. जो एक उपकरण के लिए प्रक्रिया को स्वच्छ और कैश फाइल को भी और अधिक स्मृति और प्रदर्शन ठीक है. Then again pause for 10 seconds before running srcds.exe with the full command line. तो फिर पूरा कमांड लाइन के साथ srcds.exe चलाने से पहले 10 सेकंड के लिए विराम दें. 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. इस तरीके के पहले ही सप्ताह के लिए किया गया है पूरी तरह से काम कर रहे हैं और मैं किसी अन्य ऐसे Firedaemon के रूप में उन्नत दुर्घटना वसूली सॉफ्टवेयर लागत है कि पैसे की जरूरत नहीं है.

[ [ Download Restart on Crash डाउनलोड क्रैश पर Restart ] ]

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