summaryrefslogtreecommitdiffstats
path: root/retiolum/scripts/adv_graphgen/sanitize.sh
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2011-11-04 14:21:26 +0100
committermakefu <github@syntax-fehler.de>2011-11-04 14:21:26 +0100
commit0ed905da208ff9eed13878485325ea26ae2e2c8f (patch)
tree81eb6ea1808eae5a83e3635cc8cbd553574d0020 /retiolum/scripts/adv_graphgen/sanitize.sh
parent7f69a51022ae7456c20ec5d4f0b84843561d0116 (diff)
//retiolum/adv_graphgen: replace old parsing style, refactoring
tinc_stats now writes the current tinc state into stdout as json sanitize.sh uses tinc_stats and pipes the output to parse_tinc_stats.py (the name is a lie)
Diffstat (limited to 'retiolum/scripts/adv_graphgen/sanitize.sh')
-rwxr-xr-xretiolum/scripts/adv_graphgen/sanitize.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/retiolum/scripts/adv_graphgen/sanitize.sh b/retiolum/scripts/adv_graphgen/sanitize.sh
index 3fddb605..16479304 100755
--- a/retiolum/scripts/adv_graphgen/sanitize.sh
+++ b/retiolum/scripts/adv_graphgen/sanitize.sh
@@ -1,18 +1,18 @@
#!/bin/sh
-HERE=$(dirname `readlink -f $0`)
+cd $(dirname `readlink -f $0`)
GRAPH_SETTER1=dot
GRAPH_SETTER2=circo
GRAPH_SETTER3='neato -Goverlap=prism '
GRAPH_SETTER4=sfdp
-LOG_FILE=/var/log/syslog
+#LOG_FILE=/var/log/syslog
TYPE=svg
TYPE2=png
OPENER=/bin/true
DOTFILE=`mktemp`
trap 'rm $DOTFILE' SIGINT SIGTERM
sudo pkill -USR2 tincd
-sudo sed -n '/tinc.retiolum/{s/.*tinc.retiolum\[[0-9]*\]: //gp}' $LOG_FILE |\
- $HERE/parse.py > $DOTFILE
+sudo python tinc_stats.py |\
+ python parse_tinc_stats.py > $DOTFILE
$GRAPH_SETTER1 -T$TYPE -o $1/retiolum_1.$TYPE $DOTFILE
$GRAPH_SETTER2 -T$TYPE -o $1/retiolum_2.$TYPE $DOTFILE