Skip to content

Instantly share code, notes, and snippets.

@eiglow
Created November 7, 2021 05:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eiglow/c8ecf1cb6a5648e687489163275f520c to your computer and use it in GitHub Desktop.
Save eiglow/c8ecf1cb6a5648e687489163275f520c to your computer and use it in GitHub Desktop.
Get fan speed
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