This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-tfe/script/shell/proxy_maat_stat.sh

47 lines
1.0 KiB
Bash

#!/bin/bash
ARGC=$#
EXPORTER=/opt/tsg/framework/bin/fieldstat_exporter.py
TARGET=/opt/tsg/tfe/log/pangu_scan.fs2
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
python3 $EXPORTER local -j $TARGET -e -t '
{{
print_tables
(
"TBL",
[
"rule",
"reg/v6",
"scan_times",
"hit_times",
"scan_bytes",
"scan_cpu_time",
"hit_item_num",
"hit_pat_num",
"#Name<IN_Bps>#Ratio<scan_bytes,scan_cpu_time,100>",
"#Name<hit_rate>#Ratio<hit_times,scan_times,1>"
],
False
)
}}
'