From d4c672313ea8fdce0a4cb1ba2f759992709cb175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=92=90?= Date: Fri, 1 Mar 2024 17:55:27 +0800 Subject: [PATCH] Add sar -n EDEV commond to get_net_info.py --- category/get_net_info.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/category/get_net_info.py b/category/get_net_info.py index 60da249..ee64b01 100644 --- a/category/get_net_info.py +++ b/category/get_net_info.py @@ -139,6 +139,16 @@ class NetInfo: res_d = FileOperation.wrap_output_format(cmd_name, sar_result, '-') # print("Sar_dev task 1 completed") return res_d + + def __get_sar_DEV_task2(self, interval, times): + # print("Sar_dev task 2 started") + # get "sar -n EDEV" command info + sar_command ="sar -n EDEV {} {}".format(interval, times) + cmd_name = 'sar -n DEV' + sar_result_e = Command.cmd_run(sar_command) + res_e = FileOperation.wrap_output_format(cmd_name, sar_result_e, '=') + # print("Sar_dev task 2 completed") + return res_e def get_info(self): ''' -- Gitee