Jump to content
  • 0

Batch script to delete PBOs, repack PBOs from source, kill and re-launch server processes


mgm

Question

Hey guys

 

Finally went back and cleaned up my batch rebuild script. It's sitting at 100 actual lines and pretty basic.

Just to be clear this script is intended for people doing script development on the local host.

This is not for admins of 'normal' servers -- I know there is a better scheduled batch script somewhere in this forums (I think it's under Arma2Epoch sub-forum).

 

The script below does the following:

  1. Log the launch with a single line, to a log file.
  2. Delete existing server & client side PBOs.
  3. Repack server & client side PBOs from development sources.
  4. Kill arma3 dedicated server process in-between tasks 1 & 2, so that files won't be in use.
  5. Confirm redis database is running (if not, it will launch it).
  6. Finally launches arma3 dedicated server processes to enjoy the new PBOs.

I am sure most scripters already has something similar (possibly better) in place. I'm sharing this below as it might help complete beginners to get started quickly.

Would be good to improve if anybody has any suggestions...

 

Cheers

 

  Reveal hidden contents

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I have now added a basic statistics collection, using cygwin environment.

Each time batch file is executed on top of generating a new build (as per original 1st post above) script now also generates stats similar to what you see below.

 

Stats are generated and logged in human-friendly & machine-friendly formats. human-friendly format is also displayed on screen for a quick overview (timesout and auto closes after a threshold seconds - I use 15 seconds).

 

 

  Quote
human-friendly output:                         <== to be   used   for quick on-screen check (also logged to separate file)
CURRENT_TIMESTAMP_STRING    : 20150409_2314.12
CURRENT_EPOCH_TIMESTAMP    : 1428617651
LINES_ALL_TOTAL            : 11603
LINES_ALL_EXCEPT_COMMENTS    : 7840
LINES_COMMENTS            : 3763
LINES_ALL_EXCEPT_COMMENTS_AND_BLANKS___THIS_IS_ACTUAL_CODE_DOES_NOT_EXCLUDE_TOBEEXCLUDED_FILES: 6137
LINES_IN_TOBEEXCLUDED_FILES: 1210
LINES_FINAL_ACTUAL_CODE    : 4927
CODE_COMMENT_RATIO        : 76

 

  Quote

machine-friendly output:                         <== to be used for gnuplot image generation

1428617651 11603 7840 3763 6137 1210 4927 76                

 

Obviously requires some work but this is version 0.1 :)

Stats collection is working as per above and I will share this after completing my work on the initial public alpha release of Transport for Arma

 

 

Another function I've added is writing these data to a local log file in machine-friendly format.

 

 

Once TfA initial release is done I will revisit this and the above machine-friendly data will be used to execute gnuplot to generate images from stats - output should look like the below examples.

I will have to decide what exactly to plot and how to present it to make it immediately meaningful (and hopefully handsome).

 

Example Image 1

showcase_plot.1.png

 

 

Example Image 2

  Reveal hidden contents
weekly_boxes.png

 

 

 

 

Example Image 3

  Reveal hidden contents
YPS4d.png

 

 

 

Example Image 4

  Reveal hidden contents
IPBhq.jpg

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...