Jump to content
Sign in to follow this  
sparcdr

ARMA-RP Watchdog Program

Recommended Posts

I've been working a few days on new code to monitor multiple processes, with XML support, TCP/UDP socket listening check, and memory exhaustion auto-kill.

UPDATE: Solved "This program has stopped working" preventing watchdog from "resetting", use:

REG add ""HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting"" /v DontShowUI /t REG_DWORD /d 1 or add DWORD value 1 name DontShowUI to above key. (HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting)

Code is free (BSD Licensed, Free for commercial & open-source!):

Bitbucket

Binaries:

Google Drive / Docs

Warning:

Settings.xml must be with the watchdog exe!

Edits required:

Settings.xml workingpaths are not going to always be correct (The program will tell you when a "workingdir" is invalid, so edit the Settings.xml), and formal dayz50.bat arguments must match / be ported into the process #n arguments. (In the Settings.xml; but I did the standard line as of late)

I'm using Steam on x64 (Windows 7), if you're using Windows XP x64, Windows Server 2003 x64, or Windows Server 2008 x64, you are fine under normal cases to leave it alone. (Unless you have less RAM than is prescribed in the XML!)

Hive.exe and Hiveauth.exe are automagically called, and XML supports per-process init sleep periods. (To allow time for their own initialization) If a process, such as arma2oaserver.exe takes more than prescribed in the XML; change it, so it doesn't auto-crash the process! (On a 6-core Windows 7 x64 VM (VirtualBox 4.1) it takes ~25s to start it, so make sure to give it ((seconds*1000ms) + 5s)) before complaining that it keeps killing off the process. My sleep code is in ms, not seconds!

The only other possibly planned feature (Besides bugfixes) is log rotation, as suggested by Tonic with his want for ops to rotate scripts/rpt logs for anti-cheat, etc.

Well what does it do?

A watchdog keeps track of launched process in-case of problems, and deals with them in described ways... (Mostly restarting)

  • Generic C# watchdog for monitoring/autorestarting programs. (Intended for servers with looping behaviour)
  • XML configuration support
  • Ability to one-off kill all processes
  • Date/Timestamp every log line
  • Stores/checks processes by PID
  • Memory allocation limit support
  • Total memory allocation kill support ((((System)-Processes)>=0.90) total usage)
  • TCP/UDP Port Check (Binding)

Most errors should be handled, as long as you don't do something completely stupid with the XML. If in doubt, replace, edit workingdirs, try it, and continue to edit. It doesn't handle join-spam crashing yet.

Donations:

This is more or less a stop-gap solution, but I'm spending time on it, and would like to help our server too! (DE #8) which supports 50 slots. (Hex 2.8GHz, 4.5GB ram allocation, 100mbit) Our community would very much appreciate it, and all donations go to cost! (Please consider 5 EUR or more if possible, since there is fees for transactions)

Only other disclaimer:

Donations aren't reversible, and I don't promise functionality, but I will do most things people want, if technically detailed and non-obtrusive to the nature of the program.

btn_donateCC_LG.gif

I appreciate everyone else and thank you all for your support!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×