summaryrefslogtreecommitdiff
path: root/contrib/process_log.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/process_log.sh')
-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