From 73ce30b45a02ea45b5ea5637edd1c4ac900cb428 Mon Sep 17 00:00:00 2001 From: gitee-yzh Date: Thu, 14 Apr 2022 06:47:17 +0000 Subject: [PATCH] fix pingtrace logic --- sysom_api/service_scripts/pingtrace | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sysom_api/service_scripts/pingtrace b/sysom_api/service_scripts/pingtrace index 7c4c21a7..a4beaaab 100755 --- a/sysom_api/service_scripts/pingtrace +++ b/sysom_api/service_scripts/pingtrace @@ -6,8 +6,8 @@ import sys ############################################################################### ## 如前端入参是这个: ## { -## "源虚拟机私网IP":"192.168.1.101", -## "目标虚拟机私网IP":"192.168.1.102", +## "源实例IP":"192.168.1.101", +## "目标实例IP":"192.168.1.102", ## "追踪包数":"100", ## "间隔毫秒数":"10", ## "报文协议":"ICMP" @@ -15,14 +15,14 @@ import sys ## 解析参数方法: ## sysak pingtrace -s -t 6 ## -t 6 来自 “追踪包数” * "间隔毫秒数” / 1000 + 5 -## 本命令运行在“目标虚拟机私网ip” +## 本命令运行在“目标实例ip” ## ## sysak pingtrace_raw -c 192.168.1.102 -t 2 -i 10000 -C 100 -o log -## -c 192.168.1.102 来自 “目标虚拟机私网ip” +## -c 192.168.1.102 来自 “目标实例ip” ## -t 2 来自 “追踪包数” * "间隔毫秒数” / 1000 + 1 ## -i 10000 来自 “间隔毫秒数”* 1000 ## -C 100 来自 “追踪包数” -## 本命令运行在“源虚拟机私网ip” +## 本命令运行在“源实例ip” ############################################################################### args = json.loads(sys.argv[1]) @@ -31,11 +31,11 @@ result['commands'] = [] cmd0_arg = int(int(args["追踪包数"]) * int(args["间隔毫秒数"]) / 1000) + 5 cmd0 = {} -cmd0['instance'] = args["源实例IP"] +cmd0['instance'] = args["目标实例IP"] cmd0['cmd'] = "sysak pingtrace -s -t "+str(cmd0_arg)+" > /dev/null 2>&1 &" cmd1 = {} -cmd1['instance'] = args["目标实例IP"] +cmd1['instance'] = args["源实例IP"] cmd1_arg_c = args["目标实例IP"] cmd1_arg_t = str(cmd0_arg - 4) cmd1_arg_i = str(int(args["间隔毫秒数"]) * 1000) -- Gitee