Page 1 of 1

one line cpu temp monitor real time

Posted: Mon Jul 01, 2019 7:41 pm
by hardwaremack-orginal

Code: Select all

while true; do vcgencmd measure_temp; sleep 1s; done
I had to dive through pages of stuff to find this.
enjoy!

Re: one line cpu temp monitor real time

Posted: Mon Jul 01, 2019 7:43 pm
by echmain
How much are you increasing the temperature by constantly monitoring the temperature?

Re: one line cpu temp monitor real time

Posted: Mon Jul 01, 2019 7:58 pm
by rpdom
echmain wrote:
Mon Jul 01, 2019 7:43 pm
How much are you increasing the temperature by constantly monitoring the temperature?
Probably negligible. That command takes very little processor power to run once a second.

Re: one line cpu temp monitor real time

Posted: Mon Jul 01, 2019 8:00 pm
by Roken

Code: Select all

watch -n 1 vcgencmd measure_temp
works, too.

Re: one line cpu temp monitor real time

Posted: Mon Jul 01, 2019 10:36 pm
by jamesh
Or you could add the CPU temperature icon to the task bar in the desktop....

Re: one line cpu temp monitor real time

Posted: Mon Jul 01, 2019 10:47 pm
by jahboater
Try this little script, it shows all sorts of info:

Code: Select all

#!/bin/bash
vcgencmd get_config int
Counter=14
DisplayHeader="Time       Temp     CPU     Core          Health          Vcore"
while true ; do
  let ++Counter
  if [ ${Counter} -eq 15 ]; then
	echo -e "${DisplayHeader}"
	Counter=0
  fi
  Health=$(perl -e "printf \"%19b\n\", $(vcgencmd get_throttled | cut -f2 -d=)")
  Temp=$(vcgencmd measure_temp | cut -f2 -d=)
  Clockspeed=$(vcgencmd measure_clock arm | awk -F"=" '{printf ("%0.0f",$2/1000000); }' )
  Corespeed=$(vcgencmd measure_clock core | awk -F"=" '{printf ("%0.0f",$2/1000000); }' )
  CoreVolt=$(vcgencmd measure_volts | cut -f2 -d= | sed 's/000//')
  echo -e "$(date '+%H:%M:%S')  ${Temp}  $(printf '%4s' ${Clockspeed})MHz $(printf '%4s' ${Corespeed})MHz  $(printf '%020u' ${Health})  ${CoreVolt}"
  sleep 5
done
For example:

Code: Select all

Time       Temp     CPU     Core          Health          Vcore
23:41:48  52.0'C  1600MHz  600MHz  00000000000000000000  0.8490V
23:41:53  51.0'C  1600MHz  600MHz  00000000000000000000  0.8490V
23:41:58  52.0'C  1600MHz  600MHz  00000000000000000000  0.8490V
23:42:03  53.0'C  1600MHz  600MHz  00000000000000000000  0.8490V
23:42:09  52.0'C  1600MHz  600MHz  00000000000000000000  0.8490V
23:42:14  50.0'C   400MHz  200MHz  00000000000000000000  0.8490V
23:42:19  50.0'C   400MHz  200MHz  00000000000000000000  0.8490V
23:42:24  49.0'C   400MHz  200MHz  00000000000000000000  0.8490V
23:42:29  49.0'C   400MHz  200MHz  00000000000000000000  0.8490V
23:42:34  48.0'C   400MHz  200MHz  00000000000000000000  0.8490V