sensors is a command-line tool from lm-sensors package for monitoring hardware sensors. Displays temperature, voltage, fan speed, and other hardware sensor data.
Basic Usage
- sensors - Display all sensor readings
- sensors -u - Show raw sensor data
- sensors -A - Show adapter information
- sensors -j - Output in JSON format
- sensors -f - Output in Fahrenheit
- sensors -c <config> - Use specific config file
Sensor Detection
- sensors-detect - Detect and configure sensors
- sensors-detect --auto - Auto-detect without prompts
- sensors-detect --batch - Batch mode (no prompts)
Configuration
- sensors -s - Set sensor limits from config
- sensors -c <file> - Use custom config file
- sensors --set-adapter <adapter> - Set adapter
Output Options
- sensors -u - Raw/unformatted output
- sensors -A - Show adapter names
- sensors -j - JSON output
- sensors -f - Fahrenheit instead of Celsius
- sensors -h - Show help
Common Examples
Basic Reading
sensors
Display all sensor readings.
Raw Data
sensors -u
Show raw sensor data with chip names.
JSON Output
sensors -j
Output in JSON format for scripting.
Fahrenheit
sensors -f
Display temperatures in Fahrenheit.
Detect Sensors
sudo sensors-detect
Detect and configure hardware sensors.
Auto Detect
sudo sensors-detect --auto
Auto-detect sensors without prompts.
Real-time Monitoring
watch -n 1 sensors
Monitor temperatures in real-time, updating every second.
Tips
- Run sensors-detect first to detect hardware sensors
- Use -j for JSON output when scripting
- Use -u to see raw chip data and sensor names
- Use -f if you prefer Fahrenheit temperatures
- Combine with watch for real-time monitoring: watch -n 1 sensors
- Use sensors -s to apply limits from configuration
- Check /etc/sensors3.conf for configuration options
- Essential for monitoring CPU and system temperatures
- Use watch sensors to monitor temperatures in real-time (updates every 2 seconds by default)
- For custom update interval: watch -n 0.5 sensors (updates every 0.5 seconds)