pmonitor 1.3.2__tar.gz → 1.3.4__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.3.2 → pmonitor-1.3.4}/PKG-INFO +1 -1
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/monitor_pids.py +16 -14
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/run_monitor.py +1 -1
- {pmonitor-1.3.2 → pmonitor-1.3.4}/pmonitor.egg-info/PKG-INFO +1 -1
- {pmonitor-1.3.2 → pmonitor-1.3.4}/setup.py +1 -1
- {pmonitor-1.3.2 → pmonitor-1.3.4}/README.md +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/GpuMonitorLib.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/KernelBase.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/__init__.py +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/advapi32.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/bcrypt.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/kernel.appcore.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/kernel32.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/msvcirt.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/msvcp140.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/ntdll.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/pdh.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/rpcrt4.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/sechost.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/ucrtbased.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/vcruntime140.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/DLL/vcruntime140_1.dll +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/WinPidUtil.py +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/__init__.py +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/exec/GpuMonitor +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/exec/__init__.py +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/get_process_name.py +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/monitor_mac.py +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/monitor_win.py +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/monitor/sys_info.py +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/pmonitor.egg-info/SOURCES.txt +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/pmonitor.egg-info/dependency_links.txt +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/pmonitor.egg-info/entry_points.txt +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/pmonitor.egg-info/top_level.txt +0 -0
- {pmonitor-1.3.2 → pmonitor-1.3.4}/setup.cfg +0 -0
|
@@ -203,18 +203,17 @@ class PidsPerf:
|
|
|
203
203
|
if pid == p_pid:
|
|
204
204
|
|
|
205
205
|
if gpu_info is not None:
|
|
206
|
-
print('gpu info:',gpu_info)
|
|
207
206
|
for item in gpu_info:
|
|
208
207
|
if item['ProcessID'] == p_pid:
|
|
209
208
|
main_gpu_dedicated_sum += item['GPUProcessMemoryLocalUsage'] # (专用内存)
|
|
210
209
|
main_gpu_system_sum += item['GPUProcessMemorySharedUsage'] # (共享内存)
|
|
211
210
|
main_gpu_committed_sum += item['GPUProcessMemoryTotalCommitted'] # (总使用内存)
|
|
212
211
|
main_gpu_percent_sum += item['GPUUtilizationPercent'] # (GPU内存占比)
|
|
213
|
-
print('主进程pid:', item['ProcessID'], 'Dedicated:',
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
212
|
+
# print('主进程pid:', item['ProcessID'], 'Dedicated:',
|
|
213
|
+
# main_gpu_dedicated_sum,
|
|
214
|
+
# 'System:', main_gpu_system_sum,
|
|
215
|
+
# 'Committed:', main_gpu_committed_sum, 'GPU Usage:',
|
|
216
|
+
# main_gpu_percent_sum)
|
|
218
217
|
main_data = {'cpu': cpu_usage, 'private': private_mem, "workset": workSet_mem,
|
|
219
218
|
'gpu_Dedicated': round(float(main_gpu_dedicated_sum), 2),
|
|
220
219
|
'gpu_System': round(float(main_gpu_system_sum), 2),
|
|
@@ -232,11 +231,11 @@ class PidsPerf:
|
|
|
232
231
|
if gpu_info is not None:
|
|
233
232
|
for item in gpu_info:
|
|
234
233
|
if item['ProcessID'] != p_pid:
|
|
235
|
-
print('子进程pid:', item['ProcessID'], 'Dedicated:',
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
234
|
+
# print('子进程pid:', item['ProcessID'], 'Dedicated:',
|
|
235
|
+
# item['GPUProcessMemoryDedicatedUsage'],
|
|
236
|
+
# 'System:', item['GPUProcessMemorySharedUsage'],
|
|
237
|
+
# 'Committed:', item['GPUProcessMemoryTotalCommitted'], 'GPU Usage:',
|
|
238
|
+
# item['GPUUtilizationPercent'])
|
|
240
239
|
minor_gpu_dedicated_sum += item['GPUProcessMemoryLocalUsage']
|
|
241
240
|
minor_gpu_system_sum += item['GPUProcessMemorySharedUsage']
|
|
242
241
|
minor_gpu_committed_sum += item['GPUProcessMemoryTotalCommitted']
|
|
@@ -256,9 +255,12 @@ class PidsPerf:
|
|
|
256
255
|
'gpu_System': round(minor_gpu_system_sum, 2),
|
|
257
256
|
'gpu_Committed': round(minor_gpu_committed_sum, 2),
|
|
258
257
|
'gpu_Usage': round(minor_gpu_percent_sum, 2)}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
258
|
+
try:
|
|
259
|
+
data = {'main': main_data, 'other': other_data, 'disk': disk_data}
|
|
260
|
+
json_data = json.dumps(data)
|
|
261
|
+
print(json_data)
|
|
262
|
+
except UnboundLocalError:
|
|
263
|
+
continue
|
|
262
264
|
sys.stdout.flush()
|
|
263
265
|
# 更新系统时间
|
|
264
266
|
system_time_pre = system_time_post
|
|
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
|