Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 psutil 库来获取处理器的工作量。我正在尝试在 Windows 上。当我调用 cpucompl= psutil.cpu_percent(1) 我得到的值与任务管理器不同。此外,如果我打电话percpuusage=psutil.cpu_percent(percpu=True, interval=1)并且我做出平均我希望得到的值psutil.cpu_percent(1),但事实并非如此。
cpucompl= psutil.cpu_percent(1)
percpuusage=psutil.cpu_percent(percpu=True, interval=1)
psutil.cpu_percent(1)