From eaa1a74dd61655f3af17ea54f6e16924a62151fb Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 5 Jun 2024 16:05:46 +0800 Subject: [PATCH] Update task_manager_index.py --- plugins/task_manager/task_manager_index.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/task_manager/task_manager_index.py b/plugins/task_manager/task_manager_index.py index 6d3cd24f87..c22ff7eabc 100755 --- a/plugins/task_manager/task_manager_index.py +++ b/plugins/task_manager/task_manager_index.py @@ -88,8 +88,10 @@ def get_process_net_list(self): tmp['down_package'] = int(np_list[3]) tmp['up_package'] = int(np_list[4]) self.__process_net_list[tmp['pid']] = tmp - self.last_net_process = self.__process_net_list - self.last_net_process_time = time.time() + + if time.time() - self.last_net_process_time > 3: + self.last_net_process = self.__process_net_list + self.last_net_process_time = time.time() # 获取进程连接数 def get_connects(self, pid):