From e3ce930fa6b14028aa94037bc212e49fd6938b52 Mon Sep 17 00:00:00 2001 From: Rhys Smith Date: Tue, 30 Aug 2016 16:28:44 +0100 Subject: [PATCH] Add stats utilities for UKf systems --- utilities/stats-generate.sh | 286 ++++++++++++++++++++++++++++++++++++ utilities/stats-sync.sh | 39 +++++ 2 files changed, 325 insertions(+) create mode 100755 utilities/stats-generate.sh create mode 100755 utilities/stats-sync.sh diff --git a/utilities/stats-generate.sh b/utilities/stats-generate.sh new file mode 100755 index 00000000..4a5a6433 --- /dev/null +++ b/utilities/stats-generate.sh @@ -0,0 +1,286 @@ +#!/bin/bash + +# This script will calculate stats +# +# Expects the following to be provided as arguments: +# * Time period - day/month/year +# * Time - YYYY-MM-DD/YYYY-MM/YYYY + +# Assumes you've just run stats-sync.sh to make sure the source +# log files are up to date + + + + +# ===== +# = Preamble +# ===== + + +# +# Set some common options +# +logslocation="/var/stats" +usageerrormsg="usage: generate-stats.sh