diff options
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/conf/maat_table_info.conf | 15 | ||||
| -rw-r--r-- | bin/conf/maat_test.json | 33 | ||||
| -rw-r--r-- | bin/conf/ntc_restiful.conf | 45 | ||||
| -rw-r--r-- | bin/memchk.sh | 2 | ||||
| -rw-r--r-- | bin/nr_r2 | 3 | ||||
| -rw-r--r-- | bin/nr_r3 | 17 |
6 files changed, 115 insertions, 0 deletions
diff --git a/bin/conf/maat_table_info.conf b/bin/conf/maat_table_info.conf new file mode 100644 index 0000000..3cabe9f --- /dev/null +++ b/bin/conf/maat_table_info.conf @@ -0,0 +1,15 @@ +#each collumn seperate with '\t' +#id (0~65535) +#name string +#type one of ip,expr,expr_plus,digest,intval,compile or plugin +#src_charset one of GBK,BIG5,UNICODE,UTF8 +#dst_charset combined by GBK,BIG5,UNICODE,UTF8,seperate with '/' +#do_merege yes or no +#cross cache 0~max +#quickswitch quickon or quick off +#id name type src_charset dst_charset do_merge cross_cache quickswitch +1 PXY_DYN_SERV_IP plugin 7 +2 PXY_APP_SERV_IP plugin 7 +3 PXY_LIMIT_SERV_IP plugin 7 +4 IR_DYN_SIFT_IP plugin 7 +#5 MATT_CONFIG_GROUP group UTF8 UTF8 no 0 diff --git a/bin/conf/maat_test.json b/bin/conf/maat_test.json new file mode 100644 index 0000000..87ae36a --- /dev/null +++ b/bin/conf/maat_test.json @@ -0,0 +1,33 @@ +{ + "compile_table": "CONFIG_COMPILE", + "group_table": "CONFIG_GROUP", + "rules": [ + { + "compile_id": 1, + "service": 50, + "action": 2, + "do_blacklist": 1, + "do_log": 1, + "effective_rage": 0, + "user_region": "DOMAIN_ID=151;DOMAIN_STR=baidu.com", + "is_valid": "yes", + "groups": [ + { + "group_name": "group_1", + "regions": [ + { + "table_name": "PXY_INTERCEPT_DOMAIN", + "table_type": "expr", + "table_content": { + "keywords": "baidu.com", + "expr_type": "and", + "match_method": "sub", + "format": "uncase plain" + } + } + ] + } + ] + } + ] +} diff --git a/bin/conf/ntc_restiful.conf b/bin/conf/ntc_restiful.conf new file mode 100644 index 0000000..121f15c --- /dev/null +++ b/bin/conf/ntc_restiful.conf @@ -0,0 +1,45 @@ +[SYSTEM] +thread_num=1 +log_level=10 +count_in_transaction = 200000 +domain_min_voter_num=1 +ir_pick_cli_num=100 +db_preservation_time=1800 +dyn_config_expire_time=300 +dyn_config_htable_timeout=250 +client_ip_issue_interval=1800 +server_ip_issue_interval=10 +tcp_record_sample_rate=0.05 + +[NTC_MAAT] +instance_name=ntc +table_info_path=./conf/ntc_table_info.conf +redis_ip = 10.4.34.4 +redis_port = 6380 +redis_index = 2 + +[PROXY_MAAT] +instance_name=proxy +table_info_path=./conf/proxy_table_info.conf +redis_ip = 10.4.34.4 +redis_port = 6380 +redis_index = 4 + +[OUTPUT_MAAT] +instance_name=wbf +table_info_path=./conf/output_maat_table_info.conf +redis_ip = 10.4.20.151 +redis_port = 6379 +redis_index = 0 + +[KAFKA] +KafkaBrokers=10.4.34.10:9092,10.4.34.11:9092,10.4.34.12:9092,10.4.34.13:9092,10.4.34.14:9092,10.4.34.15:9092,10.4.34.16:9092,10.4.34.17:9092,10.4.34.18:9092,10.4.34.19:9092 +ConsumeFromLatest=1 + +[STAT] +FS_IP=10.4.20.201 +FS_PORT=8125 + +[DEBUG] +#no more than 64, seperate with , +trace_keys=www.mesalab.cn, ietf.org, askar_legalkz.in diff --git a/bin/memchk.sh b/bin/memchk.sh new file mode 100644 index 0000000..8b8c67b --- /dev/null +++ b/bin/memchk.sh @@ -0,0 +1,2 @@ +#!/bin/sh +valgrind --tool=memcheck --leak-check=full --leak-resolution=high --error-limit=no --undef-value-errors=yes --show-reachable=yes --log-file=valgrind.log --malloc-fill=AA --free-fill=FE --max-stackframe=7418264 ./web_focus diff --git a/bin/nr_r2 b/bin/nr_r2 new file mode 100644 index 0000000..4efe089 --- /dev/null +++ b/bin/nr_r2 @@ -0,0 +1,3 @@ +#!/bin/sh +killall web_focus wf_r3 +./wf_r3 &> /dev/null & diff --git a/bin/nr_r3 b/bin/nr_r3 new file mode 100644 index 0000000..d0b4c08 --- /dev/null +++ b/bin/nr_r3 @@ -0,0 +1,17 @@ +#!/bin/sh + +while [ 1 ]; do + count=`ls -l core.* |wc -l` + echo $count + if [ $count -lt 5 ] + then + echo "set unlimited" + ulimit -c unlimited + else + ulimit -c 0 + fi + + ./web_focus > log/screen.log 2>&1 + echo program crashed, restart at `date +"%w %Y/%m/%d, %H:%M:%S"` >> RESTART.log + sleep 10 +done |
