summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-12-15 07:17:50 +0000
committerBart Polot <bart@net.in.tum.de>2014-12-15 07:17:50 +0000
commit5536b530b8e53158db9d14febbed025bca54fa90 (patch)
tree9d1143de0a601b5d593fa00db6ecc66c6cd28262 /contrib
parent4d352e0dc6a9a3ff9b84bca59827b9f458b9a7f8 (diff)
- move script to proper dir
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/process_log.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/process_log.sh b/contrib/process_log.sh
new file mode 100755
index 000000000..18b921a29
--- /dev/null
+++ b/contrib/process_log.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+grep "STARTING SERVICE " log > __tmp_peers
+SED_EXPR=""
+while read -r line; do
+ PEER=`echo $line | sed -e 's/.*\[\(....\)\].*/\1/'`
+ PID=`echo $line | sed -e 's/.*cadet-\([0-9]*\).*/\1/'`
+ echo "$PID => $PEER"
+ SED_EXPR="${SED_EXPR}s/cadet-\([a-z2]*\)-$PID/CADET \1 $PEER/;"
+ SED_EXPR="${SED_EXPR}s/cadet-$PID/CADET XXX $PEER/;"
+done < __tmp_peers
+rm __tmp_peers
+
+SED_EXPR="${SED_EXPR}s/cadet-api-/cadet-api- /g"
+sed -e "$SED_EXPR" log > .log
+
+if [[ "`ps aux | grep "kwrite .lo[g]"`" = "" ]]; then
+ kwrite .log --geometry 960x1140-960 &
+fi