Skip to content

Commit

Permalink
Added fan speed display (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
SunkenHero authored Sep 8, 2022
1 parent 7573df7 commit 1a35c3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions auto_cpufreq/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
warnings.filterwarnings("ignore")

# ToDo:
# - re-enable CPU fan speed display and make more generic and not only for thinkpad
# - replace get system/CPU load from: psutil.getloadavg() | available in 5.6.2)

SCRIPTS_DIR = Path("/usr/local/share/auto-cpufreq/scripts/")
Expand Down Expand Up @@ -1146,9 +1145,10 @@ def sysinfo():
global avg_all_core_temp
avg_all_core_temp = float(avg_cores_temp / online_cpu_count)

# print current fan speed | temporarily commented
# current_fans = psutil.sensors_fans()['thinkpad'][0].current
# print("\nCPU fan speed:", current_fans, "RPM")
# print current fan speed
current_fans = list(psutil.sensors_fans())
for current_fan in current_fans:
print("\nCPU fan speed:", psutil.sensors_fans()[current_fan][0].current, "RPM")


def no_stats_msg():
Expand Down

0 comments on commit 1a35c3c

Please sign in to comment.