diff --git a/category/get_net_info.py b/category/get_net_info.py index dad3fb1f2ad38dab4b408337bc37cde385fcbfa4..f471aa5b949e26d45981770c055e1d069cbb99c3 100644 --- a/category/get_net_info.py +++ b/category/get_net_info.py @@ -175,6 +175,16 @@ class NetInfo: # print("Sar_TCP task 1 completed") return res_t + def __get_sar_TCP_task2(self, interval, times): + # print("Sar_TCP task 2 started") + # get "sar -n ETCP" command info + sar_command ="sar -n ETCP {} {}".format(interval, times) + cmd_name = 'sar -n TCP' + sar_result_e = Command.cmd_run(sar_command) + res_e = FileOperation.wrap_output_format(cmd_name, sar_result_e, '=') + # print("Sar_TCP task 2 completed") + return res_e + def get_info(self): ''' Get network monitoring information external interface