apt-get install lm-sensors
This package contains the sensors tool, which if ran will output voltages and temperatures for your CPU, graphics card, and so on.
Next, we will make a simple script which will trigger sensors every five seconds, so you will be able to monitor your system in different load times:
while [[ 1 -eq 1 ]]; do
echo "Running sensors..."
echo -e "Elapsed time: $i seconds\n"
echo "Use ^C (CTRL+C) to stop"
i=$(( $i + 5 ))
This script will run the sensors utility every five seconds. You can save it under a suggestive name,
say cputemp.sh, make it executable (chmod 755 cputemp.sh) and put it in a directory in your path
(e.g. ~/bin/, where ~ is your home directory).