23 Oct אוקטובר 23
If you are running a CSS server on linux, the server itself already supports auto restarting srcds when crash. אם אתה מפעיל שרת לינוקס ב-CSS, השרת עצמו כבר תומכת אוטומטית מחדש כאשר srcds לקרוס. However on Windows, you can do it via a batch file. עם זאת ב-Windows, אתה יכול לעשות זאת באמצעות קובץ אצווה. 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. ובכן Valve ממליצה אנחנו צריכים לחכות 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 on Crash is an monitoring tool that will watch the applications that you specify and automatically relaunch any program that hangs or crashes. הפעל מחדש על קראש הוא כלי ניטור כי יצפו יישומים שתציין באופן אוטומטי 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. הפעל מחדש על קראש אינה דורשת התקנה וחנויות כל זה נתוני תצורה 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 יבוצע. 
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. הפקודה הראשונה מראה כי אני פינג localhost 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. ואז שוב הפסקה במשך 10 שניות לפני הפעלת srcds.exe עם שורת הפקודה מלא. 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 להוריד מחדש על קראש ] ]
Technorati Tags: Technorati Tags: restart מחדש , , crash התרסקות , , firedaemon firedaemon , , srcds srcds , , windows Windows
: Copying this article to your website is strictly NOT allowed. : העתקת מאמר זה באתר שלך היא בהחלט אסור. However, if you like this article, you can use the HTML code below to directly link to this article. עם זאת, אם אתה רוצה מאמר זה, אתה יכול להשתמש בקוד ה-HTML ישירות אל מתחת הקישור למאמר זה. Disable Program Has Stopped Working Error Dialog in Windows Server 2008 תוכנית השבת הפסיק לפעול שגיאה Dialog ב-Windows Server 2008 Sending Email Using Command Line Useful for Downtime Alert Notification שליחת דוא"ל באמצעות שורת הפקודה שימושיים עבור השבתה התראת הודעה Keep Application Running by Automatically ReRun When Closed לשמור באופן אוטומטי על ידי הפעלת יישומים מופעל מחדש כאשר סגור Shut down Unnecessary Services and Programs with AlacrityPC כבה שירותים מיותרים עם תוכניות AlacrityPC Automatically Close Running Programs and Eject USB PenDrive סגור אוטומטית בהפעלת תוכניות ו הוצא ה-USB pendrive Angsuman’s Translator Plugin Pro causing High Load for servers Angsumanâ € ™ s מתרגם Plugin Pro גרימת טעינה גבוהה עבור שרתי Nero 7.2.3.2b fixes audio CD skipping problem נירון 7.2.3.2b תיקוני תקליטור שמע מדלגים על הבעיה
Have computer technical problems? האם המחשב בעיות טכניות? Get FREE help from Raymond.CC FORUM להשתחרר עזרה Raymond.CC פורום
6 Responses for "Execute any File When Application Crashed or Stopped Running (Useful for SRCDS)" 6 תגובות עבור "הפעלת היישום כאשר כל קובץ או הפעלת Crashed הופסק (שימושי עבור SRCDS)"
Very Useful! מאוד שימושי!
I have a problem using this tool. יש לי בעיה בכלי זה.
I choose an application on “MONITOR THIS APPLICATION”..for example opera.exe אני בוחר בקשה על "יישום לעקוב אחר" .. עבור opera.exe לדוגמה
after i wish if Opera isn't running to run Firefox by a run.bat לאחר הלוואי אם אופרה לא פועל כדי להפעיל אתר על ידי run.bat
the problem is that when i choose the run.bat the same run.bat appears in the box MONITOR THIS APPLICATION הבעיה היא שכאשר אני בוחר את run.bat run.bat אותו מופיע בתיבה מוניטורים יישום זה
i don't understand אני לא מבין
I find the solution אני מוצא את הפתרון
I have to modify manually the box in witch I run run.bat אני צריך לשנות באופן ידני את הקופסה מכשפה אני רץ run.bat
ALL is ok now כולם בסדר עכשיו
It's great זה נהדר
it will be usefull for when i set up a counter strike in my home זה יהיה שימושי כאשר הקמתי שביתה הדלפק בבית שלי
do you think its possible fro me to set up at home via wireless connection? אתה חושב שניתן הלוך ושוב לי להגדיר בבית דרך החיבור האלחוטי שלה?
Raymond, I really like the use of CleanMem that you've implemented. ריימונד, אני ממש אוהב להשתמש של CleanMem כי יישמת. I'm going to give Shane a call and tell him about it. אני הולך לתת שיין שיחה ולספר לו על זה.
Just out of curiousity are you running CleanMem with the “Clear File Cache” option enabled or disabled? סתם מתוך סקרנות אתה רץ עם CleanMem באפשרות "נקה קובץ מטמון" מופעלת או מושבתת? If you've tried it both ways for this server have you noticed any positive or negative impact either way? אם ניסית את זה בשתי דרכים עבור שרת הבחנת כל השפעה חיובית או שלילית בכל מקרה?
Oh yeah, welcome back from the honeymoon and congrats! אה, כן, ברוכים השבים מירח הדבש ועל Congrats!
-Evan -אוואן
http://www.PcWinTech.com http://www.PcWinTech.com – Home of CleanMem - הבית של CleanMem
I'll keep this in mind. אני אשמור את זה בחשבון. Hopefully I can use it when I host a CS Server. יש לקוות אני יכול להשתמש בו כאשר אני מארח שרת CS.
Leave a reply השאירו תגובה