From f1fd1d0ad300af6f695990455aeb3ebeba9fb3db Mon Sep 17 00:00:00 2001 From: luqiuwen Date: Mon, 16 Sep 2019 16:40:31 +0800 Subject: #167 增加已拦截连接数、字节数、PASSTHROUGH连接数统计并调整FieldStat状态文件的输出位置。 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/src/proxy.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'platform/src/proxy.cpp') diff --git a/platform/src/proxy.cpp b/platform/src/proxy.cpp index 90a653b..c98f334 100644 --- a/platform/src/proxy.cpp +++ b/platform/src/proxy.cpp @@ -307,9 +307,7 @@ static const char * __str_stat_spec_map[] = [STAT_SIGPIPE] = "SIGPIPE", [STAT_FD_OPEN_BY_KNI_ACCEPT] = "fd_rx", [STAT_FD_CLOSE_BY_KNI_ACCEPT_FAIL] = "fd_rx_err", - [STAT_FD_INSTANT_CLOSE] = "fd_inst_cls", - [STAT_FD_DEFER_CLOSE_IN_QUEUE] = "fd_dfr_cls", - [STAT_FD_DEFER_CLOSE_SUCCESS] = "fd_dfr_clsd", + [STAT_FD_CLOSE] = "fd_inst_cls", [STAT_STREAM_OPEN] = "stm_open", [STAT_STREAM_CLS] = "stm_cls", [STAT_STREAM_CLS_DOWN_EOF] = "dstm_eof", @@ -317,16 +315,19 @@ static const char * __str_stat_spec_map[] = [STAT_STREAM_CLS_DOWN_ERR] = "dstm_err", [STAT_STREAM_CLS_UP_ERR] = "ustm_err", [STAT_STREAM_CLS_KILL] = "stm_kill", + [STAT_STREAM_INTERCEPT] = "stm_incpt", + [STAT_STREAM_BYPASS] = "stm_byp", + [STAT_STREAM_INCPT_BYTES] = "stm_incpt_B", + [STAT_STREAM_INCPT_DOWN_BYTES] = "dstm_incpt_B", + [STAT_STREAM_INCPT_UP_BYTES] = "ustm_incpt_B", [STAT_STREAM_TCP_PLAIN] = "plain", - [STAT_STREAM_TCP_SSL] = "SSL", - [STAT_STREAM_DOWN_RX_BYTES] = "dstm_bytes", - [STAT_STREAM_UP_RX_BYTES] = "ustm_bytes", + [STAT_STREAM_TCP_SSL] = "ssl", [TFE_STAT_MAX] = NULL }; int tfe_stat_init(struct tfe_proxy * proxy, const char * profile) { - static const char * fieldstat_output = "./tfe.fieldstat"; + static const char * fieldstat_output = "log/tfe.fs2"; static const char * app_name = "tfe3a"; int value = 0, i = 0; -- cgit v1.2.3