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
It's unlikely this can be done on all platforms and all the times as this kind of info is typically not standardized and varies depending on the hardware. Anyway, it may be nice to have a psutil.cpu_freq() function returning a list of named tuples for each CPU including current and nominal (max) frequency.
The returned list should be consistent with psutil.cpu_count() and psutil.cpu_percent(percpu=True) both in length and indexing.
If added, the API should be marked as provisional, stating it can change or be removed entirely in case it shows to be unreliable.
Linux
$ cat /proc/cpuinfo | grep MHz
cpu MHz : 899.640
cpu MHz : 949.507
cpu MHz : 900.046
cpu MHz : 899.640
cpu MHz : 933.867
cpu MHz : 896.695
cpu MHz : 900.046
cpu MHz : 899.945
min and max freqs are in /sys/devices/system/cpu/cpu (see doc)
It's unlikely this can be done on all platforms and all the times as this kind of info is typically not standardized and varies depending on the hardware. Anyway, it may be nice to have a
psutil.cpu_freq()
function returning a list of named tuples for each CPU including current and nominal (max) frequency.API
The returned list should be consistent with
psutil.cpu_count()
andpsutil.cpu_percent(percpu=True)
both in length and indexing.If added, the API should be marked as provisional, stating it can change or be removed entirely in case it shows to be unreliable.
Linux
min and max freqs are in
/sys/devices/system/cpu/cpu
(see doc)OSX
Note: does not provide per-cpu info.
BSD
TODO
Windows
Looks like it's possible to get only nominal frequency:
http://stackoverflow.com/a/7544085
http://stackoverflow.com/questions/8351944/finding-out-the-cpu-clock-frequency-per-core-per-processor
SunOS
http://www.oracle.com/technetwork/articles/servers-storage-admin/script-clockrate-1980818.html
Other links
https://www.google.cz/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=python%20cpu%20frequency
https://github.com/workhorsy/py-cpuinfo
The text was updated successfully, but these errors were encountered: