You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mozz85
changed the title
cpu_percent always return 0.0 for other process
cpu_percent return 0.0 for single process, but it was okay for system-wild CPU utilization
Jul 18, 2023
You are right. Althought the process that i want to check out did something, when i print out the os_process.pid, i found out that's not it. The code that i copied from chatgpt set the shell=True when calling the Popen. and i know nothing about it. That opens a shell, and that shell opens the intended process.
Summary
psutil 5.9.2
windows
Description
here is the test code
here is the output
if the image load failed
0.0
0.0
0.0
0.0
The text was updated successfully, but these errors were encountered: