File tree 1 file changed +0
-21
lines changed
1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ def get_all_processes_stats_json(load):
86
86
'diskio' : psutil .disk_io_counters (perdisk = True , nowrap = True ),
87
87
'netio' : psutil .net_io_counters (pernic = True , nowrap = True ),
88
88
}
89
- < << << << HEAD
90
89
processes = psutil .process_iter ()
91
90
for process in processes :
92
91
name = ""
@@ -99,24 +98,4 @@ def get_all_processes_stats_json(load):
99
98
pass
100
99
except Exception as ex :
101
100
print (f"while inspecting { name } : { ex } " )
102
- == == == =
103
- for n in [True , False ]:
104
- processes = psutil .process_iter ()
105
- for process in processes :
106
- name = ""
107
- try :
108
- name = process .name ()
109
- if process .pid not in [1 , 2 ] and process .ppid () != 2 :
110
- procstat = gather_process_thread_statistics (process )
111
- if n :
112
- process_full_list [f"p{ process .pid } " ] = procstat
113
- else :
114
- add_delta (process_full_list [f"p{ process .pid } " ], procstat )
115
- except psutil .AccessDenied :
116
- pass
117
- except Exception as ex :
118
- print (f"while inspecting { name } : { ex } " )
119
- if n :
120
- time .sleep (1 )
121
- > >> >> >> 9 bac7477 (write system information as well )
122
101
return json .dumps (process_full_list )
You can’t perform that action at this time.
0 commit comments