Jump to content

[RELEASE] Server Keepalive Batch Tool


uniflare

Recommended Posts

Sourceforge: https://sourceforge.net/projects/skbtforarma/
 

 

[RELEASE] Arma 2/3 Server Keepalive Batch Tool 1.2.2
I wrote this for our old A2 Epoch server in hopes of making a very simple and light-weight easy to use keepalive/restarter, it was very useful, thought I'd share with the public. This tool has developed on these forums considerably and now has many many more features that make administering and controlling your server much easier.

Keepalive Status Window
jsQSVNQ.png

Keepalive GUI
5eFIZwI.png

Keepalive GUI Configuration Properties
2xgHryz.png

 

Feature Archive:

 

-Gui-

ADDED IN 1.2.2: Higher core support for setting affinities (up to 100 cores O.O)
ADDED IN 1.2.2: New status icons in config window for batch/server status
ADDED IN 1.2.2: Added a new control bar in config window, to control keepalive/server

 

-Core-

ADDED IN 1.2.2: Added an exit batch check and new file to set this flag externally to close the keepalive.

  • Auto start Database/Arma server and BEC if any one of them fails
  • Logs events in real-time with a console display
  • Easy configuration for any arma server (arma/arma 2/arma 3)
  • Ability to Auto restart using BEC Scheduler (check readme for details)
  • Ability to manually restart from an external program (eg, Web Service on same machine)
  • Keepalive for the Keepalive (if batch crashes or something, it will keep running regardless)
  • Auto log file rotation *added in 0.8.0
  • Auto Database Backup *added in 0.8.0
  • Ability to use 7zip to archive logs and/or database file *added in 0.8.0
  • Keep Arma Server Monitor active (Optional) (addon for arma 2/3) *added in 0.8.0
  • Keep Teamspeak Server Active (Optional) *added in 0.8.0
  • Database Interval, Minutes between DB Backups *added in 0.9.0
  • Ability to keep ASM server monitor alive. *added in 0.9.0
  • Ability to keep Teamspeak server alive. *added in 0.9.0
  • Log backup and db backup locations configurable *added in 0.9.0
  • Lets arma close nicely using #shutdown on automatic restarts (BEC Scheduler required) *added in 0.9.0
  • Manual Action Timeout configurable. (How long will it take you to upload new pbos?) *added in 0.9.0
  • Configuration settings for ASM logging capabilities. Check batch settings. *fixed in 0.9.1
  • Ability to configure another process to keep alive (such as a HC client or another server using a renamed exe file). *NEW IN 0.9.2
  • Project on Sourceforge and GitHub. *NEW IN 0.9.4
  • Crash Detection! Will force close any crashed processes! *NEW IN 0.9.4
  • Affinity and Priority settings! *NEW IN 0.9.4
  • Sleek GUI for managing and installing SKBT for multiple server on the same machine/network!*ADDED IN 1.0.0
  • Keepalive instance shortcuts to start menu and desktop. ADDED IN 1.0.1
  • Usage of parenthesis and spaces in path names fully! ADDED IN 1.0.3
  • Allow bec_flag_dsc parameter, (fix BEC auto closing due to no update signal). ADDED IN 1.0.3
  • Ability to change log detail level. Added in 1.1.0
  • Can forcefully delay between ONLY restart events
  • 3 batch files in custom folder to aid in hooking code before certain events, more info inside those files (Check readme or more info)
  • Tooltips to all configuration options
  • Custom process tab! Keep any process you wish alive with your server (up to 100 extra processes!). ADDED IN 1.2.0
  • Heartbeat for external programs to know if the Keepalive is active. ADDED IN 1.2.0
     
Quote

Any problems or suggestions post here, It should work on any windows platform straight out the box after following the README.txt.
Good Luck !

Downloads:

NOTE*: Please use the sourceforge/Github repositories to download.
 
[LATEST RELEASE]
DOWNLOAD 1.2.2 - GUI Installer
tinyupload.com
 
DOWNLOAD 1.2.2 - No Gui (Manual Install)
tinyupload.com
 
Mirrors on SourceForge / GitHub
Development Snapshots available as standard.

[OLDER RELEASES]

For older releases please use the github/sourceforce release lists.

Spoiler


DOWNLOAD 1.2.1 - GUI Installer
tinyupload.com
 
DOWNLOAD 1.2.1 - No Gui (Manual Install)
tinyupload.com

DOWNLOAD 1.2.0 - GUI Installer
tinyupload.com
 
DOWNLOAD 1.2.0 - No Gui (Manual Install)
tinyupload.com

DOWNLOAD 1.1.0.2 - GUI Installer
tinyupload.com
 
DOWNLOAD 1.1.0 - No Gui (Manual Install)
tinyupload.com
 
DOWNLOAD 1.1.0 - GUI Installer
tinyupload.com
 
DOWNLOAD 1.0.3 - GUI Installer
tinyupload.com
 
DOWNLOAD 1.0.3.1 HOTFIX - No Gui (Manual Install)
tinyupload.com
 
DOWNLOAD 1.0.3 No GUI
tinyupload.com
 
DOWNLOAD 1.0.1 GUI HOTFIX
tinyupload.com
 
DOWNLOAD 1.0.1 GUI
tinyupload.com
 
DOWNLOAD 1.0 GUI
tinyupload.com

DOWNLOAD 0.9.4
tinyupload.com

DOWNLOAD 0.9.3 HOTFIX:
tinyupload.com

DOWNLOAD 0.9.2:
tinyupload.com


DOWNLOAD 0.9.1:
tinyupload.com

DOWNLOAD 0.9.0:
tinyupload.com

DOWNLOAD 0.8.0:
tinyupload.com

DOWNLOAD 0.7.8:
tinyupload.com


*Latest Release:

Please be advised the download links in this post are not the latest. SKBT was updated after the latest official release but do not fear! You do not need to build it!
To download the latest binary of SKBT click here (sourceforge/skbtforarma/Master/Bin/Release/skbtInstaller_win32.exe)
Check the commit logs on SF/GH for updates and changes.

edit-
Updated to 1.2.2.1 (Only on repo)

Link to comment
Share on other sites

Thanks I am glad its working for you. Yes seems the time variable is "dynamic" to each computer/timezones/regions etc.

Can you execute this at command line prompt on the machine: echo "%TIME%"

Then show me the results (copy+paste using mark by right click console window->mark and select and copy as usual - may need to right click on title bar to copy rather than on console window).

Thanks!

Link to comment
Share on other sites

Updated to 0.9.0

NEW: Moved database backup to runtime loop which allows;
NEW: A new setting in config: Database Interval, Minutes between DB Backups
NEW: Ability to keep ASM server monitor alive.
NEW: Ability to keep Teamspeak server alive.
NEW: Log backup and db backup locations configurable
NEW: Many more new settings explained in config.
NEW: Graceful process end timeout, let arma close nicely using #shutdown (BEC Scheduler required)
NEW: Manual Action Timeout configurable. (How long will it take you to upload new pbos?)
CLUTTER: Temp files moved to batch_lib folder to hide clutter in main arma folder
FIXED: Time/Date strings should now function on all windows variants beyond Win XP

Link to comment
Share on other sites

Thanks I am glad its working for you. Yes seems the time variable is "dynamic" to each computer/timezones/regions etc.

Can you execute this at command line prompt on the machine: echo "%TIME%"

Then show me the results (copy+paste using mark by right click console window->mark and select and copy as usual - may need to right click on title bar to copy rather than on console window).

Thanks!

 

 

%TIME% works of cause, because it's a system variable of windows.

 

I don't care about it, it work's very well :)

Link to comment
Share on other sites

%TIME% works of cause, because it's a system variable of windows.

 

I don't care about it, it work's very well :)

Thanks, the time string func uses a new method that should be consistent acroos different regions. The reason the old method failed for you is likely that your regional settings that show your date is very different than mine (and my ger server). Anyway all fixed now :).

I am currently trying to sort auto server file update, eg, place the server file in a specified folder and it will automatically overwrite the old server file with the new one on the next restart, it will rename the old server file with .original suffix.

Cheers

Link to comment
Share on other sites

Hey dude, firstly well done. Real nice Batch.

Is it normal that the keepalive_launcher stays open ?

I noticed that i only get one server event. :/

Everything loads fine but just curous, cant see any exit points to close it down.

Also I have bolted in my own pbo packer into it and that works great.

Finally, has anyone got a gracefull shutdown of redis instead of dirty exe execute ? :P

 

Cheers

George

Link to comment
Share on other sites

Hey dude, firstly well done. Real nice Batch.

Is it normal that the keepalive_launcher stays open ?

I noticed that i only get one server event. :/

Everything loads fine but just curous, cant see any exit points to close it down.

Also I have bolted in my own pbo packer into it and that works great.

Finally, has anyone got a gracefull shutdown of redis instead of dirty exe execute ? :P

 

Cheers

George

 

Thanks man appreciated, there is no way to exit the batch apart from closing the keepalive launcher (it should stay open), it is in case the main loop in the keepalive gets corrupted somehow and crashes (has happened to me i think some int limits or something strange, batch is really the wierdest s*** i've ever tried coding in....).

 

You say you only get one server event? I would love to troubleshoot this with you if you have the time, can you pm me your batchrun.log file?

 

Yes I was going to add auto pbo/server file option (including any server file), but there are some strange things with batch, like both the if AND else statements execute??? lolz.. really wierd stuff.. I am actually going to try my hand at making a complete management tool in visual basic, see how it goes though I can be slow when I don't want to be xD.

 

for a graceful shutdown of redis you could just pipe commands to redis-cli.exe from a cmd file.

 

Will probably do one more update of these batch tools.

 

Thanks

Link to comment
Share on other sites

Pushed Release 0.9.2

 

FIXED: Some hard-coded paths and exe names were replaced with variables from config.

NEW: Can configure to keep a separate Arma process alive (for headless clients).

 

 

 

Thanks for this Great Tool ... But would like to ask if you could Add a    HeadLess Client  routine to it  ..... Been tring to add it but I keep getting Stuck ....

 

No problem, here I have pushed release a little earlier than I wanted as I wanted to include a wrapper/installer and push as final release as there has been no bug reports and I can't find anything wrong. The new release (0.9.2) includes the ability to keep another server process alive with a different exe name (for a Headless Client process or any other process name you want to keep alive).

 

Let me know if it works out for you, thanks.

 

Great work. Thanks for this awsome tool

 

Very welcome thanks for letting me know it works for you :).

Link to comment
Share on other sites

Don't think I missed anything but KeepAlive isn't working for me. Getting a

Status: Critical Error

Server events:

0 was unexepected at this time.

My path is correct as it's launching ka_launcher.bat fine, but the rest fails. Running this on Windows Server 2012 R2

Link to comment
Share on other sites

Works like a Dream Even My HeadLess Client Works Now... 10 out of 10 ... thx  uniflare for your Hard Work 

uniflare  ... A couple of Problems I have Noticed with the New Update .. I find My HC starts Before My Server  and  My HC doesn't auto Restart when Bec does a Restart ( it stays on) all the Rest Restarts ... Is this Normal or is there a Problem ? 

Link to comment
Share on other sites

uniflare  ... A couple of Problems I have Noticed with the New Update .. I find My HC starts Before My Server  and  My HC doesn't auto Restart when Bec does a Restart ( it stays on) all the Rest Restarts ... Is this Normal or is there a Problem ?

I can add the hc to the restart procedure but tbh it should reconnect when the server starts up again. So it shouldn't be a problem.

Thanks for the feedback.

Link to comment
Share on other sites

OK thx for the Feed back ... Got it to work Now ...... But How do I get the ASM working ... added @asm tothe Mod list in the config and the exe to the main arma 3 dir.... but where do I put the other files from the download  , 

 

I have put the rest into the Arma dir  start the Server and everything runs but have no data from ASM ... what Have I done Wrong !!!

Link to comment
Share on other sites

You install the mods as per usual, and you set in the batch_settings file the location of the asm.exe. By default you can just whack the asm exe and dll in the arma directory and it should fire up fine.

 

ASM wont have any data or start logging until the mission is started. (Usually until someone joins and starts the mission).

 

Good luck

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...