ControlScripts: add over-script for parsing client log files
authorRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tue, 3 Aug 2010 17:10:02 +0000 (20:10 +0300)
committerRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tue, 3 Aug 2010 17:10:02 +0000 (20:10 +0300)
ControlScripts/parse_client_log.sh [new file with mode: 0755]

diff --git a/ControlScripts/parse_client_log.sh b/ControlScripts/parse_client_log.sh
new file mode 100755 (executable)
index 0000000..5bb0624
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# 2010 Razvan Deaconescu, razvan.deaconescu@cs.pub.ro
+#
+# Parse log file
+# The script
+#  * parses a client-specific log file
+#
+# Command line argument specifies client type, log folder and log file
+
+# use _DEBUG="off" to turn off debug printing
+_DEBUG="on"
+
+if test $# -ne 3; then
+       echo "usage: $0 client-type log-folder log-file" 1>&2
+       exit 1
+fi
+
+# Read the global configuration variables
+source ../ConfigFiles/globalconfig.txt
+
+# Read client mappings configuration file
+source ../ConfigFiles/client_script_mappings
+
+client_type=$1
+log_folder=$2
+log_file=$2
+
+parse_client_log ${client_type} ${log_folder} ${log_file}