-
Notifications
You must be signed in to change notification settings - Fork 4
/
gatherRawData.sh
executable file
·64 lines (53 loc) · 2.89 KB
/
gatherRawData.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#! /bin/bash
if [ -f SOURCE_DIRECTORY ]; then
ROOT_SRC_DIR="$(cat SOURCE_DIRECTORY)"
else
ROOT_SRC_DIR="./"
fi
mkdir results 2> /dev/null
SPARK_REPO="${ROOT_SRC_DIR}/spark"
MEMCACHED_REPO="${ROOT_SRC_DIR}/memcached/"
RAMCLOUD_REPO="${ROOT_SRC_DIR}/RAMCloud/"
APACHE_REPO="${ROOT_SRC_DIR}/httpd"
LINUX_PP_REPO="${ROOT_SRC_DIR}/linux-preprocessed"
SPARK_LOG_FNS="logTrace logDebug logInfo logWarning logError"
echo "" > results/spark.txt
for LOG_FN in $SPARK_LOG_FNS
do
python sparkParser.py $LOG_FN ${SPARK_REPO} > results/${LOG_FN}.txt
cat results/${LOG_FN}.txt >> results/spark.txt
done
## Memcached
python logParserForC.py printf 0 $MEMCACHED_REPO > results/mem_printf.txt
python logParserForC.py fprintf 1 $MEMCACHED_REPO > results/mem_fprintf.txt
python logParserForC.py snprintf 2 $MEMCACHED_REPO > results/mem_snprintf.txt
python logParserForC.py L_DEBUG 0 $MEMCACHED_REPO > results/mem_L_DEBUG.txt
python logParserForC.py E_DEBUG 0 $MEMCACHED_REPO > results/mem_E_DEBUG.txt
## RAMCloud
python logParserForC.py --serverIdFix RAMCLOUD_LOG 1 $RAMCLOUD_REPO > results/ramcloud_ramcloud_log.txt
python logParserForC.py --serverIdFix LOG 1 $RAMCLOUD_REPO > results/ramcloud_log.txt
python logParserForC.py --serverIdFix RAMCLOUD_DIE 0 $RAMCLOUD_REPO > results/ramcloud_ramcloud_die.txt
python logParserForC.py --serverIdFix DIE 0 $RAMCLOUD_REPO > results/ramcloud_die.txt
python logParserForC.py --serverIdFix RAMCLOUD_CLOG 1 $RAMCLOUD_REPO > results/ramcloud_ramcloud_clog.txt
python logParserForC.py --serverIdFix RAMCLOUD_TEST_LOG 0 $RAMCLOUD_REPO > results/ramcloud_ramcloud_test_log.txt
python logParserForC.py --serverIdFix RAMCLOUD_TEST 0 $RAMCLOUD_REPO > results/ramcloud_ramcloud_test.txt
## Apache
python logParserForC.py --apacheApLogNoFix ap_log_error 4 $APACHE_REPO > results/apache_ap_log_error.txt
python logParserForC.py --apacheApLogNoFix ap_log_rerror 4 $APACHE_REPO > results/apache_ap_log_rerror.txt
python logParserForC.py --apacheApLogNoFix ap_log_cerror 4 $APACHE_REPO > results/apache_ap_log_cerror.txt
python logParserForC.py --apacheApLogNoFix ap_log_perror 4 $APACHE_REPO > results/apache_ap_log_perror.txt
# # ## These log messsages shouldn't really be counted since they're used by utilities/tests
# # python logParserForC.py --apacheApLogNoFix printf 0 $APACHE_REPO > results/apache_printf.txt
# # python logParserForC.py --apacheApLogNoFix fprintf 1 $APACHE_REPO > results/apache_fprintf.txt
## Linux
echo "Starting linux jobs... This could take a while..."
python logParserForC.py --preprocessed printk 0 ${LINUX_PP_REPO} > results/linux_printk.txt &
P1=$!
python logParserForC.py --preprocessed dev_printk 2 ${LINUX_PP_REPO} > results/linux_dev_printk.txt &
P2=$!
python logParserForC.py --preprocessed WARN_ONCE 1 ${LINUX_PP_REPO} > results/linux_warn_once.txt &
P3=$!
# Insert a trap to stop the linux processors
trap 'kill $P1 $P2 $P3; exit' SIGINT
wait
echo "Linux parsing done!"