代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From f2080c02b864d6ce7f07b874e489bb5ea98b837a Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Wed, 6 Dec 2023 20:33:13 +0800
Subject: [PATCH] dfx: fix 'gazellectl lstack show ip' failed
---
src/common/gazelle_dfx_msg.h | 3 ++-
src/ltran/ltran_dfx.c | 7 +++++--
src/ltran/ltran_monitor.c | 2 +-
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/common/gazelle_dfx_msg.h b/src/common/gazelle_dfx_msg.h
index ac6ea5e..d2c6ef9 100644
--- a/src/common/gazelle_dfx_msg.h
+++ b/src/common/gazelle_dfx_msg.h
@@ -35,9 +35,10 @@ enum GAZELLE_STAT_MODE {
GAZELLE_STAT_LTRAN_LOG_LEVEL_SET,
GAZELLE_STAT_LTRAN_SHOW_SOCKTABLE,
GAZELLE_STAT_LTRAN_SHOW_CONNTABLE,
+ GAZELLE_STAT_LTRAN_SHOW_LSTACK,
- GAZELLE_STAT_LSTACK_LOG_LEVEL_SET,
GAZELLE_STAT_LSTACK_SHOW,
+ GAZELLE_STAT_LSTACK_LOG_LEVEL_SET,
GAZELLE_STAT_LSTACK_SHOW_RATE,
GAZELLE_STAT_LSTACK_SHOW_SNMP,
GAZELLE_STAT_LSTACK_SHOW_CONN,
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index d3ff527..c200b1d 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -105,8 +105,11 @@ static struct gazelle_dfx_list g_gazelle_dfx_tbl[] = {
{GAZELLE_STAT_LTRAN_LOG_LEVEL_SET, 0, gazelle_print_ltran_wait},
{GAZELLE_STAT_LTRAN_SHOW_SOCKTABLE, sizeof(struct gazelle_stat_forward_table), gazelle_print_ltran_sock},
{GAZELLE_STAT_LTRAN_SHOW_CONNTABLE, sizeof(struct gazelle_stat_forward_table), gazelle_print_ltran_conn},
+
+ {GAZELLE_STAT_LTRAN_SHOW_LSTACK, sizeof(struct gazelle_stat_lstack_total), gazelle_print_lstack_stat_total},
+ {GAZELLE_STAT_LSTACK_SHOW, sizeof(struct gazelle_stack_dfx_data), gazelle_print_lstack_stat_total},
+
{GAZELLE_STAT_LSTACK_LOG_LEVEL_SET, 0, gazelle_print_ltran_wait},
- {GAZELLE_STAT_LSTACK_SHOW, sizeof(struct gazelle_stat_lstack_total), gazelle_print_lstack_stat_total},
{GAZELLE_STAT_LSTACK_SHOW_RATE, sizeof(struct gazelle_stack_dfx_data), gazelle_print_lstack_stat_rate},
{GAZELLE_STAT_LSTACK_SHOW_SNMP, sizeof(struct gazelle_stack_dfx_data), gazelle_print_lstack_stat_snmp},
{GAZELLE_STAT_LSTACK_SHOW_CONN, sizeof(struct gazelle_stack_dfx_data), gazelle_print_lstack_stat_conn},
@@ -1265,7 +1268,7 @@ static int32_t parse_dfx_lstack_show_args(int32_t argc, char *argv[], struct gaz
long int delay = 1;
if (argc == GAZELLE_LSTACK_PARAM_NUM) {
- req_msg[cmd_index++].stat_mode = GAZELLE_STAT_LSTACK_SHOW;
+ req_msg[cmd_index++].stat_mode = g_use_ltran ? GAZELLE_STAT_LTRAN_SHOW_LSTACK : GAZELLE_STAT_LSTACK_SHOW;
return cmd_index;
}
diff --git a/src/ltran/ltran_monitor.c b/src/ltran/ltran_monitor.c
index 792db89..b2bcc07 100644
--- a/src/ltran/ltran_monitor.c
+++ b/src/ltran/ltran_monitor.c
@@ -338,7 +338,7 @@ static int32_t lstack_req_mode_process(int32_t fd, const struct gazelle_stat_msg
case GAZELLE_STAT_LTRAN_SHOW_LB_RATE:
handle_resp_lstack_total(req_msg, fd);
break;
- case GAZELLE_STAT_LSTACK_SHOW:
+ case GAZELLE_STAT_LTRAN_SHOW_LSTACK:
handle_resp_lstack_total(req_msg, fd);
handle_resp_lstack_transfer(req_msg, fd);
break;
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。