Using the new PiCockpit v2.0 release, you can monitor the current SoC temperature of the Pi in an easy to use webinterface (in PiStats).
Simply click on PiStats, and enter temp into the search:
this will narrow the display down to just the SoC temperature. The temperature will be updated every second.
I also recommend you to use the PiDoctor’s System module, on auto-reload to monitor temperature limit, frequency cap and throttling events.
scroll down to see the throttling & under-voltage view:
This is the view you would like to see – the system stays within the temperature limits, there is no throttling – your Pi operates optimally.
There are two different deviations from this: currently out of spec (e.g. is currently in under voltage) , or has been out of spec in the past (e.g. had undervoltage since last boot) – you can see both in this view.
Create a button to launch stress on the Pi on-demand
You will need the command line for this one.
sudo apt-get update
sudo apt-get install stress
sudo nano /etc/picockpit-client/apps/com.picockpit/picontrol/modules/user.json
Enter the following configuration into the new file:
„name“: „User commands“,
„description“: „User commands for demo of PiControl“,
„name“: „start stress“,
„description“: „Puts stress on the Pi CPU to heat it up“,
„command“: [„stress“, „–cpu“, „80“]
Note: Unfortunately WordPress messes up code formatting and characters. Please refer to this screenshot for how the text should look like:
Tip: you can see a list of all available icons here (Material Design Icons).
Save with Ctrl + O, Exit with Ctrl + X
Then reload picockpit-client.
sudo service picockpit-client reload
In PiControl, a new panel with User commands should now appear:
(no need to reload the website – it will appear by itself, if the Pi is online and the PiCockpit frontend has a connection).
A screenshot before starting
Here is a screenshot of the output of PiStats before starting Stress:
note the low CPU Load at 1 % and the SoC temperature at 44.303 °C
Now click the “Start Stress” button to start Stress. The PiControl screen will change like this:
PiStats with stress running
As you can see, the CPU load is immediately at 100 %, and the SoC temperature jumped to 61.835 °C.
Using different parameters for stress will allow you to vary the load to model a realistic picture of the expected load.
Additionally, you could load the VideoCore by playing a video for example – further heating the SoC.
Continue to monitor the Throttling & under-voltage section in PiDoctor’s System module to see if such events occur.
Pushing the SoC
I put some bubble wrap on top of the Pi, to prevent efficient air circulation, and am also running a video off the Pi:
(You will need to provide your own video file for this, I am using a download of this YouTube video)
These measures, taken together push the SoC to over 80 °C:
This also shows up in PiDoctor:
In this screenshot you see the ARM frequency cap being activated, to protect the SoC from damage by overheating.
Further up in the System module, you can also check the current CPU frequency. In this case it was limited to 1 GHz:
The cap is lifted when temperature drops, the frequency goes back to 1,5 GHz (on a Pi 4):
But the fact that there had been a frequency capping event will remain until the next boot:
Tip: in order to prevent overheating of the Pi 4 under massive workloads, we recommend to use the FLIRC case.
Keep the window open where you started stress from – you will be able to stop it here by clicking on Stop process.
Note: you might get a warning message, but CPU usage will drop back to normal, indicating that stress was stopped:
This is the PiCockpit way of things – of course, you can also simply run stress from the command line (by SSH for example).
Monitoring temperature this way is great to see the effects of different enclosures & scenarios on your Raspberry Pi.