From 503bede6af7e3876242024f06e3185e91862f21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=92=90?= Date: Fri, 12 Apr 2024 18:12:03 +0800 Subject: [PATCH] Add multithreaded functions to get_net_info.py --- category/get_net_info.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/category/get_net_info.py b/category/get_net_info.py index 5e4eb5f..445e037 100644 --- a/category/get_net_info.py +++ b/category/get_net_info.py @@ -16,6 +16,7 @@ from common.file import FileOperation from common.global_parameter import GlobalParameter from common.log import Logger from common.command import Command +from common.global_call import GlobalCall # net class @DecoratorWrap.singleton @@ -168,6 +169,7 @@ class NetInfo: res_e = FileOperation.wrap_output_format(cmd_name, sar_result_e, '=') return res_e + @GlobalCall.monitor_info_thread_pool.threaded_pool def __get_sar_DEV_info(self, interval, times): ''' sar -n DEV @@ -191,6 +193,7 @@ class NetInfo: res_e = FileOperation.wrap_output_format(cmd_name, sar_result_e, '=') return res_e + @GlobalCall.monitor_info_thread_pool.threaded_pool def __get_sar_TCP_info(self, interval, times): ''' sar -n TCP @@ -209,4 +212,5 @@ class NetInfo: self.__get_devices_info() self.__get_eth_off_info() self.__get_sar_DEV_info(self.__interval, self.__times) - self.__get_sar_TCP_info(self.__interval, self.__times) \ No newline at end of file + self.__get_sar_TCP_info(self.__interval, self.__times) + return True \ No newline at end of file -- Gitee