File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Expand file tree Collapse file tree 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):
8686 'diskio' : psutil .disk_io_counters (perdisk = True , nowrap = True ),
8787 'netio' : psutil .net_io_counters (pernic = True , nowrap = True ),
8888 }
89- < << << << HEAD
9089 processes = psutil .process_iter ()
9190 for process in processes :
9291 name = ""
@@ -99,24 +98,4 @@ def get_all_processes_stats_json(load):
9998 pass
10099 except Exception as ex :
101100 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 )
122101 return json .dumps (process_full_list )
You can’t perform that action at this time.
0 commit comments