Created
November 7, 2021 05:22
-
-
Save eiglow/c8ecf1cb6a5648e687489163275f520c to your computer and use it in GitHub Desktop.
Get fan speed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
def rpm(): | |
return int( | |
subprocess.check_output( | |
"sensors | grep fan6", | |
shell=True | |
).decode()[23:-22] | |
) | |
if __name__ == '__main__': | |
print(f"{rpm()} RPM") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment