From fee8c8c3db020f4cfdad107055f4aa16deb5d70e Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 5 Jun 2024 17:13:16 +0800 Subject: [PATCH] Update task_manager_index.py --- plugins/task_manager/task_manager_index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/task_manager/task_manager_index.py b/plugins/task_manager/task_manager_index.py index 1a6c23b4d3..3d822e413c 100755 --- a/plugins/task_manager/task_manager_index.py +++ b/plugins/task_manager/task_manager_index.py @@ -72,6 +72,7 @@ def instance(cls, *args, **kwargs): def get_process_net_list(self): + import copy w_file = '/dev/shm/mw_net_process' if not os.path.exists(w_file): return net_process_body = mw.readFile(w_file) @@ -90,7 +91,7 @@ def get_process_net_list(self): self.__process_net_list[tmp['pid']] = tmp if time.time() - self.last_net_process_time > 60 or self.last_net_process_time == 0: - self.last_net_process = self.__process_net_list + self.last_net_process = copy.deepcopy(self.__process_net_list) self.last_net_process_time = time.time() # 获取进程连接数