summaryrefslogtreecommitdiff
path: root/bin/dns_decoder_local_stat.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/dns_decoder_local_stat.sh')
-rw-r--r--bin/dns_decoder_local_stat.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/bin/dns_decoder_local_stat.sh b/bin/dns_decoder_local_stat.sh
new file mode 100644
index 0000000..588662f
--- /dev/null
+++ b/bin/dns_decoder_local_stat.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+ARGC=$#
+EXPORTER=/opt/tsg/framework/bin/fieldstat_exporter.py
+TARGET=/opt/tsg/sapp/metrics/dns_decoder_local_stat.json
+
+case $1 in
+ -h|--help)
+ echo "$0"
+ echo "Usage: [exporter] [target]"
+ echo " exporter: path of exporter, default is $EXPORTER"
+ echo " target: path of target file, default is $TARGET"
+ exit 0
+ ;;
+esac
+
+case $ARGC in
+ 1)
+ EXPORTER=$1
+ ;;
+ 2)
+ EXPORTER=$1
+ TARGET=$2
+ ;;
+esac
+#new version
+python3 $EXPORTER local -j $TARGET -e -t '
+ {{"dns decoder message"}}
+ {{ print_tables("message_type", ["send", "#Speed<send>", "recv", "#Speed<recv>"], True )}} {{"\n"}}
+
+ {{"dns decoder memory"}}
+ {{ print_tables("memory", ["new", "#Speed<new>", "free", "#Speed<free>"], True )}} {{"\n"}}
+
+ {{"dns decoder decode status"}}
+ {{ print_tables("decode_field", ["error", "#Speed<error>"], True )}} {{"\n"}}
+
+'