pmonitor 1.2.0__tar.gz → 1.2.1__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.0 → pmonitor-1.2.1}/PKG-INFO +1 -1
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/monitor_pids.py +6 -6
- {pmonitor-1.2.0 → pmonitor-1.2.1}/pmonitor.egg-info/PKG-INFO +1 -1
- {pmonitor-1.2.0 → pmonitor-1.2.1}/setup.py +1 -1
- {pmonitor-1.2.0 → pmonitor-1.2.1}/README.md +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/GpuMonitorLib.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/KernelBase.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/__init__.py +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/advapi32.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/bcrypt.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/kernel.appcore.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/kernel32.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/msvcirt.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/msvcp140.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/ntdll.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/pdh.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/rpcrt4.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/sechost.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/ucrtbased.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/vcruntime140.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/DLL/vcruntime140_1.dll +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/WinPidUtil.py +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/__init__.py +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/exec/GpuMonitor +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/exec/__init__.py +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/get_process_name.py +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/monitor_mac.py +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/monitor_win.py +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/run_monitor.py +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/monitor/sys_info.py +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/pmonitor.egg-info/SOURCES.txt +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/pmonitor.egg-info/dependency_links.txt +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/pmonitor.egg-info/entry_points.txt +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/pmonitor.egg-info/top_level.txt +0 -0
- {pmonitor-1.2.0 → pmonitor-1.2.1}/setup.cfg +0 -0
|
@@ -21,12 +21,12 @@ class PidsPerf:
|
|
|
21
21
|
|
|
22
22
|
def get_mac_perf(self):
|
|
23
23
|
current_pid = self.processUtil.find_main_process_pid(self.process_name)
|
|
24
|
-
|
|
25
|
-
if os.path.exists(
|
|
26
|
-
if not os.access(
|
|
24
|
+
gpu_tool = os.path.join(os.path.dirname(__file__), 'exec', 'GpuMonitor')
|
|
25
|
+
if os.path.exists(gpu_tool):
|
|
26
|
+
if not os.access(gpu_tool, os.X_OK):
|
|
27
27
|
try:
|
|
28
|
-
current_permissions = os.stat(
|
|
29
|
-
os.chmod(
|
|
28
|
+
current_permissions = os.stat(gpu_tool).st_mode
|
|
29
|
+
os.chmod(gpu_tool, current_permissions | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
|
|
30
30
|
except Exception as e:
|
|
31
31
|
raise e
|
|
32
32
|
while True:
|
|
@@ -42,7 +42,7 @@ class PidsPerf:
|
|
|
42
42
|
current_pids.add(current_pid) # 将主进程及子进程添加到list中
|
|
43
43
|
pids_process = self.processUtil.get_pids_process(current_pids) # 获取所有进程
|
|
44
44
|
|
|
45
|
-
result = subprocess.run([
|
|
45
|
+
result = subprocess.run([gpu_tool], stdout=subprocess.PIPE, text=True)
|
|
46
46
|
for line in result.stdout.split('\n'):
|
|
47
47
|
pattern = r"GPU Name:(.*?),Device Percent:(.*?),Dedicated Usage:(\d+)"
|
|
48
48
|
matches = re.findall(pattern, line)
|
|
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
|