Skip to content

Instantly share code, notes, and snippets.

@Nymphium
Last active August 29, 2015 14:16
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 Nymphium/57c3c49c547381059230 to your computer and use it in GitHub Desktop.
Save Nymphium/57c3c49c547381059230 to your computer and use it in GitHub Desktop.
CPU Temp/Clock
watch -t -c -n 0.3 -p "cat /proc/cpuinfo | awk 'BEGIN{i = 0; cnt = 0} \$2 == \"MHz\" {i += \$4; cnt++}END{printf \"Average Clock: %4.2f MHz\", i / cnt}'"
watch -t -c -n 0.3 -p "sensors | awk 'BEGIN{i = 0; cnt = 0} \$1 == \"Core\" {i += \$3; cnt++}END{printf \"Average CPU Temperature: %2.2f℃\",i / cnt}'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment