Skip to content

Commit

Permalink
Update task_manager_index.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Jun 5, 2024
1 parent d942900 commit fee8c8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/task_manager/task_manager_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()

# 获取进程连接数
Expand Down

0 comments on commit fee8c8c

Please sign in to comment.