# Examples of how to run the processing script
#   Environment
#     rawdatafiles directory: contains output of collect_server_details.sh for one or more servers
#     results directory: will have the results, entrypoint index.html
#     archive directory: optionally take an archive snapshot of the results into here
#

#--------------------------------------------------------------------------------
# DEFAULT processing: process all server collection datafiles in the --datadir directory.
# Results stored in directory 'results'
# Results archived into directory 'archive'
#--------------------------------------------------------------------------------
bash bin/process_server_details.sh --datadir=rawdatafiles --archivedir=archive 
#bash bin/process_server_details.sh --datadir=rawdatafiles    # or with no archive

#--------------------------------------------------------------------------------
# Example of processing updates to a single server named phoenix
#--------------------------------------------------------------------------------
#bash bin/process_server_details.sh --datadir=rawdatafiles --oneserver=phoenix

#--------------------------------------------------------------------------------
# 1st line is an example of checking if there are new datafiles to process,
# 2nd line is checking and processing any new datafiles found
#--------------------------------------------------------------------------------
#bash bin/process_server_details.sh --datadir=rawdatafiles --checkchanged=list
#bash bin/process_server_details.sh --datadir=rawdatafiles --checkchanged=process

#--------------------------------------------------------------------------------
# example of just refresing the index page
# this is intended to be used where you have multiple servers doing processing
# and have copied the contents of the results directory into this servers
# results directory (and ideally file files from --datadir also or those results
# will be deleted on the next full processing run).
# While the --datadir is ignored in this case it is still a required parm
#--------------------------------------------------------------------------------
#bash bin/process_server_details.sh --datadir=rawdatafiles --indexonly=yes
#
# The below will also include the kernel version of each OS in the index page
#bash bin/process_server_details.sh --datadir=rawdatafiles --indexonly=yes --indexkernel=yes

#--------------------------------------------------------------------------------
# You should never need this, debug processing
# If used process a max of one server or the output debug.log file will be
# huge.
#--------------------------------------------------------------------------------
#echo "To see what is going on 'tail -f debug.log' while I am debugging"
#bash -x bin/process_server_details.sh --datadir=rawdatafiles > debug.log 2>&1
#
#--------------------------------------------------------------------------------
# If the server is rebooted, or the script is broken out of, the lockfile will
# hand around and prevent future runs, so I added these to make removing the
# lockfile easier.
#--------------------------------------------------------------------------------
#bash bin/process_server_details.sh --listlock
#bash bin/process_server_details.sh --clearlock
