Raspberry Pi Temperature Testing over SSH
Scenario
Tonight I spent some time using the Raspberry Pi as a small Linux lab machine over SSH. The goal was not to build anything large, but to get more familiar with basic system inspection, monitoring, process control, and hardware temperature testing from the command line.
The Pi had already been running continuously for nearly 25 days, which made it a useful platform for checking system health and experimenting without disrupting anything important.
Checking Storage
I started by checking mounted filesystems and available space.
df -hThis showed the usual temporary filesystems along with the Pi boot partition:
/dev/mmcblk0p1 505M 190M 315M 38% /boot/firmwareThe output is useful for quickly confirming whether storage is becoming constrained and which filesystems are mounted.
Checking CPU Temperature
On Raspberry Pi hardware, the vcgencmd utility can be used to read the processor temperature.
sudo vcgencmd measure_tempInitial result:
temp=34.0'CThis was a very low temperature and showed that the Pi was essentially idling.
Checking Listening Services
I then checked which ports and services were listening:
ss -tulpnSome of the interesting results were:
22/tcp SSH
3001/tcp application/service
53 local DNS resolver
631 local printing service
5353 mDNSThis is a useful command from both a system administration and cybersecurity perspective because it provides a quick view of the network-facing attack surface of the machine.
Generating CPU Load
To deliberately load the processor, I started a simple background process:
yes > /dev/null &The yes command continuously generates output. Redirecting that output to /dev/null means the data is discarded, while the process still consumes CPU time.
The shell returned a background job:
[1] 1464327I then checked system load:
uptimeExample output:
up 24 days, 23:15
load average: 1.32, 1.20, 1.26This showed the effect of deliberately running a CPU-intensive process.
Watching System Activity
I used:
btopbtop provides a live terminal dashboard showing CPU utilisation, memory, processes, load, and other system activity. This made it easy to see the yes process consuming processor time.
Stopping the Test
After the test I terminated the load-generating process:
killall yesThe shell confirmed:
Terminated yes > /dev/nullMeasuring Temperature Again
I then checked the processor temperature a second time:
sudo vcgencmd measure_tempResult:
temp=36.5'CThe temperature had increased from:
34.0°C → 36.5°CThis was only a small rise, suggesting that the Pi was handling the short CPU load comfortably.
Learning
This short experiment reinforced several basic Linux skills:
- inspecting filesystems
- checking listening ports
- monitoring CPU and processes
- deliberately creating processor load
- terminating processes
- reading Raspberry Pi hardware temperature
- interpreting system load averages
The useful thing about this type of experiment is that each command is simple in isolation, but together they build a much clearer picture of how a Linux system behaves.