相关疑难解决方法(0)

如何找出使用python的CPU数量

我想知道使用Python的本地机器上的CPU数量.当使用最佳扩展用户空间程序调用时,结果应该是user/real输出time(1).

python system-information

477
推荐指数
12
解决办法
25万
查看次数

How to get the processor name in Python?

Using the platform module in Python on my Windows laptop, I get the following output

import platform
platform.processor()
Run Code Online (Sandbox Code Playgroud)

'Intel64 Family 6 Model 58 Stepping 9, GenuineIntel'

If I look at the Windows System Information, however, I am told that my processor is an Intel Core i5-3317U CPU at 1.70Ghz. How can I get Python to return processor information in this format?

python windows

4
推荐指数
2
解决办法
3320
查看次数

Python - 核心速度

我试图找出这个值存储在windowsosx中的位置,以便进行一些计算以更好地分配任务.

核心速度,单位为Hz

提前致谢.

使用platform.process()命令只返回名称而不是速度

我只是设法通过这个:

import subprocess  
info=subprocess.check_output(["wmic","cpu","get", "name"])  
print info.split('@')[1].split(' ')[1]
Run Code Online (Sandbox Code Playgroud)

但目前我无法判断它是否总能在每台机器上返回相同的结果(现在无法访问其他计算机)

python cpu cpu-speed cpu-cores

4
推荐指数
1
解决办法
5422
查看次数

有没有办法用python获取本地机器的进程信息?

我想要的东西会收到我的流程细节,就像我在linux中使用'ps'命令收到的那样,

获得2个基本类型 - CPU使用率和使用的内存.

今天为了得到这个我使用不舒服的方式:

subprocess.check_output(["ps", "aux"])
Run Code Online (Sandbox Code Playgroud)

........

并解析此输出..

任何想法或解决方案都可以接受!

谢谢!

python cpu process

1
推荐指数
1
解决办法
1831
查看次数