pmonitor 1.2.3__tar.gz → 1.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pmonitor-1.2.3 → pmonitor-1.2.5}/PKG-INFO +1 -1
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/monitor_pids.py +47 -44
- {pmonitor-1.2.3 → pmonitor-1.2.5}/pmonitor.egg-info/PKG-INFO +1 -1
- {pmonitor-1.2.3 → pmonitor-1.2.5}/setup.py +1 -1
- {pmonitor-1.2.3 → pmonitor-1.2.5}/README.md +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/GpuMonitorLib.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/KernelBase.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/__init__.py +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/advapi32.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/bcrypt.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/kernel.appcore.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/kernel32.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/msvcirt.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/msvcp140.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/ntdll.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/pdh.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/rpcrt4.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/sechost.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/ucrtbased.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/vcruntime140.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/DLL/vcruntime140_1.dll +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/WinPidUtil.py +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/__init__.py +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/exec/GpuMonitor +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/exec/__init__.py +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/get_process_name.py +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/monitor_mac.py +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/monitor_win.py +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/run_monitor.py +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/monitor/sys_info.py +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/pmonitor.egg-info/SOURCES.txt +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/pmonitor.egg-info/dependency_links.txt +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/pmonitor.egg-info/entry_points.txt +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/pmonitor.egg-info/top_level.txt +0 -0
- {pmonitor-1.2.3 → pmonitor-1.2.5}/setup.cfg +0 -0
|
@@ -202,29 +202,28 @@ class PidsPerf:
|
|
|
202
202
|
private_mem = round(memory_info.PrivateUsage / 1024 / 1024, 2) # MB
|
|
203
203
|
if pid == p_pid:
|
|
204
204
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
if item['
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
'gpu_Committed': round(main_gpu_committed_sum, 2), 'gpu_Usage': round(main_gpu_percent_sum, 2)}
|
|
205
|
+
if gpu_info is not None:
|
|
206
|
+
for item in gpu_info:
|
|
207
|
+
if item['ProcessID'] == p_pid:
|
|
208
|
+
if item['GPUUtilizationPercent'] < 0:
|
|
209
|
+
# print('主进程pid:', item['ProcessID'], 'Dedicated:', 0,
|
|
210
|
+
# 'System:', 0,
|
|
211
|
+
# 'Committed:', 0, 'GPU Usage:',
|
|
212
|
+
# 0)
|
|
213
|
+
main_gpu_dedicated_sum += 0
|
|
214
|
+
main_gpu_system_sum += 0
|
|
215
|
+
main_gpu_committed_sum += 0
|
|
216
|
+
else:
|
|
217
|
+
# print('主进程pid:', item['ProcessID'], 'Dedicated:',
|
|
218
|
+
# item['GPUProcessMemoryLocalUsage'],
|
|
219
|
+
# 'System:', item['GPUProcessMemorySharedUsage'],
|
|
220
|
+
# 'Committed:', item['GPUProcessMemoryTotalCommitted'], 'GPU Usage:',
|
|
221
|
+
# item['GPUUtilizationPercent'])
|
|
222
|
+
main_gpu_dedicated_sum += item['GPUProcessMemoryDedicatedUsage'] # (专用内存)
|
|
223
|
+
main_gpu_system_sum += item['GPUProcessMemorySharedUsage'] # (共享内存)
|
|
224
|
+
main_gpu_committed_sum += item['GPUProcessMemoryTotalCommitted'] # (总使用内存)
|
|
225
|
+
main_gpu_percent_sum += item['GPUUtilizationPercent'] # (GPU内存占比)
|
|
226
|
+
|
|
228
227
|
|
|
229
228
|
# print(
|
|
230
229
|
# f'主进程数据:cpu:{cpu_usage},workSet:{workSet_mem},private:{private_mem},mem_percent:{mem_percent},thread_count:{thread_count}')
|
|
@@ -234,33 +233,37 @@ class PidsPerf:
|
|
|
234
233
|
minor_private_mem_sum += private_mem # 子进程private内存
|
|
235
234
|
minor_mem_percent_sum += mem_percent # 子进程内存使用率
|
|
236
235
|
minor_thread_count_sum += thread_count # 子进程线程总数
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
if item['
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
236
|
+
if gpu_info is not None:
|
|
237
|
+
for item in gpu_info:
|
|
238
|
+
if item['ProcessID'] != p_pid:
|
|
239
|
+
if item['GPUUtilizationPercent'] < 0:
|
|
240
|
+
# print('子进程pid:', item['ProcessID'], 'Dedicated:', 0,
|
|
241
|
+
# 'System:', 0,
|
|
242
|
+
# 'Committed:', 0, 'GPU Usage:',
|
|
243
|
+
# 0)
|
|
244
|
+
minor_gpu_dedicated_sum += 0
|
|
245
|
+
minor_gpu_system_sum += 0
|
|
246
|
+
minor_gpu_committed_sum += 0
|
|
247
|
+
minor_gpu_percent_sum += 0
|
|
248
|
+
else:
|
|
249
|
+
# print('子进程pid:', item['ProcessID'], 'Dedicated:',
|
|
250
|
+
# item['GPUProcessMemoryLocalUsage'],
|
|
251
|
+
# 'System:', item['GPUProcessMemorySharedUsage'],
|
|
252
|
+
# 'Committed:', item['GPUProcessMemoryTotalCommitted'], 'GPU Usage:',
|
|
253
|
+
# item['GPUUtilizationPercent'])
|
|
254
|
+
minor_gpu_dedicated_sum += item['GPUProcessMemoryLocalUsage']
|
|
255
|
+
minor_gpu_system_sum += item['GPUProcessMemorySharedUsage']
|
|
256
|
+
minor_gpu_committed_sum += item['GPUProcessMemoryTotalCommitted']
|
|
257
|
+
minor_gpu_percent_sum += item['GPUUtilizationPercent']
|
|
258
258
|
minor_io_read_sum += read_bytes_sec # 所有进程IO读取速率总数
|
|
259
259
|
minor_io_write_sum += write_bytes_sec # 所有进程IO写入速率总数
|
|
260
260
|
|
|
261
261
|
else:
|
|
262
262
|
# print(f"PID {pid}: Process not found or access denied")
|
|
263
263
|
continue
|
|
264
|
+
main_data = {'cpu': cpu_usage, 'private': private_mem, "workset": workSet_mem,
|
|
265
|
+
'gpu_Dedicated': round(main_gpu_dedicated_sum, 2), 'gpu_System': round(main_gpu_system_sum, 2),
|
|
266
|
+
'gpu_Committed': round(main_gpu_committed_sum, 2), 'gpu_Usage': round(main_gpu_percent_sum, 2)}
|
|
264
267
|
disk_data = {'io read': minor_io_read_sum, 'io write': minor_io_write_sum}
|
|
265
268
|
other_data = {'cpu': minor_cpu_sum, 'private': round(float(minor_private_mem_sum), 2),
|
|
266
269
|
'workset': round(float(minor_workSet_mem_sum), 2),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|