diff --git a/category/get_net_info.py b/category/get_net_info.py index f471aa5b949e26d45981770c055e1d069cbb99c3..fd5394c1569a15b41f590313e55e62c8acdc4402 100644 --- a/category/get_net_info.py +++ b/category/get_net_info.py @@ -185,6 +185,15 @@ class NetInfo: # print("Sar_TCP task 2 completed") return res_e + def __get_sar_TCP_info(self, interval, times): + ''' + sar -n TCP + ''' + # Multithreading obtains "sar -n TCP" command information + tasks = [self.__get_sar_TCP_task1, self.__get_sar_TCP_task2] + res = self.__multi_threads_get_info(tasks, interval, times) + return Command.cmd_write_file(res, self.__default_file_name) + def get_info(self): ''' Get network monitoring information external interface @@ -193,4 +202,5 @@ class NetInfo: return False self.__get_devices_info() self.__get_eth_off_info() - self.__get_sar_DEV_info(self.__interval, self.__times) \ No newline at end of file + self.__get_sar_DEV_info(self.__interval, self.__times) + self.__get_sar_TCP_info(self.__interval, self.__times) \ No newline at end of file