CPU Temperature and Thermal Throttling on Linux
CPU Temperature and Thermal Throttling on Linux
Monitor CPU temperature and throttling to track thermal conditions, detect overheating, and prevent performance degradation. This guide shows you how to monitor CPU temperature and set up automated monitoring.
For comprehensive CPU monitoring, see CPU Monitoring. For troubleshooting CPU issues, see High CPU Usage.
Why Monitoring CPU Temperature Matters
High CPU temperature can cause thermal throttling, reducing CPU performance and potentially causing system instability. Monitoring CPU temperature helps prevent overheating and maintain optimal performance.
Method 1: Check CPU Temperature
Check Temperature with sensors
# Install sensors
sudo apt-get install lm-sensors # Debian/Ubuntu
sudo yum install lm_sensors # CentOS/RHEL
# Detect sensors
sudo sensors-detect
# Check CPU temperature
sensors
# Get CPU temperature only
sensors | grep "Core\|CPU\|Package"
Check Temperature from /sys
# Check CPU temperature (if available)
cat /sys/class/thermal/thermal_zone*/temp
# Convert to Celsius
for zone in /sys/class/thermal/thermal_zone*/temp; do
TEMP=$(cat $zone)
echo "$zone: $(($TEMP / 1000))°C"
done
Method 2: Check CPU Throttling
Monitor Thermal Throttling
# Check thermal throttling status
cat /proc/cpuinfo | grep -i "throttle"
# Check CPU frequency scaling
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
# Check CPU max frequency
cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_max_freq
Method 3: Automated Temperature Monitoring with Zuzia.app
Manual checks work while you are looking. To keep running them without you, Zuzia uses its agent and scheduled tasks.
How it works in Zuzia
- Install the Zuzia agent on the server with one command. CPU, RAM, disk, load and network metrics start reporting on their own, with alerts on a threshold, on drift from the server's normal, or on a disk fill-up forecast.
- Save the commands from this guide as a scheduled task and choose how often it runs, from every minute to once a year. The agent runs it on every host you pick.
- If a command fails, you get an alert right away by email, Slack, Discord, push (through your Pushover account) or SMS (through your Vonage account).
- The output of every run is kept, so you can look back at what changed. On paid plans, AI can read the output and alert you only when it spots a problem.
Setting it up
- Add the server in the Zuzia dashboard and install the agent.
- Create a scheduled task with the check commands below, then choose the hosts and how often it runs.
- Choose your notification channels. Turn on maintenance mode during planned work so it doesn't trigger alerts.
Best Practices for Temperature Monitoring
1. Monitor Temperature Continuously
- Track CPU temperature regularly
- Alert when temperature exceeds thresholds
- Monitor temperature trends over time
- Optimize cooling based on data
2. Monitor Thermal Throttling
- Track throttling events
- Alert on throttling detection
- Investigate root causes
- Optimize cooling and airflow
3. Set Appropriate Thresholds
- Set thresholds based on CPU specifications
- Adjust thresholds for different server types
- Monitor temperature during peak usage
- Alert on temperature spikes
4. Optimize Server Environment
- Ensure adequate cooling
- Optimize server airflow
- Monitor server room temperature
- Maintain server hardware
Troubleshooting Temperature Issues
Step 1: Identify Temperature Problems
When CPU temperature is high:
# Check current temperature
sensors
# Check thermal throttling
dmesg | grep -i "thermal\|throttle"
# Check CPU frequency
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
Step 2: Resolve Temperature Issues
Based on investigation:
Improve Cooling:
- Ensure adequate airflow
- Clean server fans
- Optimize server room temperature
Optimize CPU Usage:
- Reduce CPU load
- Optimize applications
- Scale infrastructure
Fix Hardware Issues:
- Replace faulty fans
- Fix cooling systems
- Update server hardware
FAQ: Common Questions About CPU Temperature Monitoring
How often should I check CPU temperature?
For production servers, continuous automated monitoring is essential. Zuzia.app can check CPU temperature every few minutes, storing historical data and alerting you when temperature exceeds thresholds.
What is considered high CPU temperature?
High CPU temperature depends on your CPU model. Generally, temperatures under 60°C are excellent, 60-70°C are good, 70-80°C are acceptable, and over 80°C require attention. Set thresholds based on your CPU specifications.
How do I prevent CPU overheating?
Prevent CPU overheating by ensuring adequate cooling, optimizing server airflow, monitoring server room temperature, reducing CPU load, and maintaining server hardware properly.
Can temperature monitoring impact server performance?
Temperature monitoring commands have minimal impact on server performance when done correctly. Use appropriate monitoring frequency and ensure monitoring doesn't interfere with server operations.
Related guides, recipes, and problems
Related guides
guides--monitoring-cpu.mdguides--server-performance-monitoring-best-practices.md
Related recipes
recipes--monitor-cpu-temperature-linux-server.mdrecipes--monitor-top-cpu-processes-linux.md
Related problems
problems--high-cpu-usage-server.mdproblems--server-slow-performance-issues.md