How to Check Voltage on Linux

Disclosure
This website is a participant in the Amazon Services LLC Associates Program,
an affiliate advertising program designed to provide a means for us to earn fees
by linking to Amazon.com and affiliated sites.

Checking voltage on Linux is a crucial system monitoring task. It helps diagnose hardware issues and ensure component stability. This guide provides the direct commands and methods.

Monitoring voltages can prevent system crashes and hardware damage. It is essential for overclockers, server admins, and power users. You can identify failing power supplies or unstable configurations.

Best Tools for Checking Voltage on Linux

LM-Sensors Package – Best Overall Software

The lm-sensors package is the definitive command-line tool for Linux hardware monitoring. It supports a vast array of motherboard sensors, CPUs, and GPUs. After a simple configuration (sensors-detect), it provides real-time voltage, temperature, and fan speed readings. This is the best option for terminal power users and scriptable monitoring.

Psensor – Best Graphical Interface

Psensor provides an excellent GUI front-end for the lm-sensors data. It displays voltages in real-time with clear graphs and system tray alerts. You can easily track minimum and maximum values over time. This tool is ideal for desktop users who prefer visual monitoring without using the terminal.

GKrellM – Best for Custom System Dashboards

GKrellM is a highly customizable stacking monitor application. It can display voltage readings alongside dozens of other system metrics in a compact, always-on dashboard. Its plugin architecture allows for deep customization. This is the recommended choice for users wanting a persistent, at-a-glance hardware overview.

How to Check Voltage Using the Linux Terminal

Using the terminal is the most powerful and direct method for voltage monitoring. It provides real-time access to sensor data and is perfect for remote servers or scripting. This section covers the essential command-line tools you need to master.

Installing and Configuring lm-sensors

The first step is installing the lm-sensors package, which is the backbone of hardware monitoring. On Debian/Ubuntu systems, use sudo apt install lm-sensors. For Fedora/RHEL, use sudo dnf install lm_sensors.

After installation, you must detect and configure your hardware sensors. Run the detection command with sudo sensors-detect. Answer “yes” to all default prompts to ensure all sensors are loaded.

Key Takeaway: The sensors-detect command is crucial. It probes your hardware and generates the configuration file needed for the sensors command to display accurate data.

Using the Basic Sensors Command

Once configured, simply run the sensors command in your terminal. This will output a detailed list of all detected sensor readings from your motherboard, CPU, and other components.

A typical output includes several voltage rails (Vcore, +3.3V, +12V), temperatures, and fan speeds. The values are displayed in a clear, labeled format for easy reading.

  • Vcore: The core voltage supplied to your CPU. This is critical for stability, especially when overclocking.
  • +12V, +5V, +3.3V: These are the main voltage rails from your Power Supply Unit (PSU). Significant deviations here can indicate a failing PSU.
  • Vin, AVCC: Various other input and auxiliary voltages monitored by the motherboard.

Advanced Terminal Monitoring Techniques

For continuous monitoring, use the watch command. The syntax watch -n 2 sensors will update the sensor readings every 2 seconds. This is ideal for observing voltage fluctuations under load.

To monitor a specific voltage rail, you can filter the output. Use a command like sensors | grep 'Vcore' to isolate just the CPU core voltage from the full report.

For logging data to a file for later analysis, use redirection: sensors >> voltage_log.txt. You can combine this with watch to create a time-series log of your system’s health.

Graphical Tools for Monitoring System Voltage

For users who prefer a visual interface, several excellent GUI tools can display voltage data. These applications present sensor readings in an accessible, graphical format. They are perfect for real-time desktop monitoring and historical analysis.

Setting Up and Using Psensor

Psensor is a popular GTK+ application that visualizes data from lm-sensors. Install it on Ubuntu with sudo apt install psensor. Once launched, it automatically detects and lists all available sensors.

The main window shows current values for voltages, temperatures, and fan speeds. You can click on any sensor to open a detailed real-time graph. This makes it easy to spot trends or sudden drops in voltage.

  • Real-time Graphing: Visualize voltage stability over time with live charts.
  • Alert System: Set up desktop notifications for when a voltage falls below or exceeds a safe threshold.
  • Min/Max Tracking: Automatically records the lowest and highest recorded values during a session.

Creating a Custom Dashboard with GKrellM

GKrellM takes a different approach by providing a modular, always-on dashboard. Install it using your package manager, for example, sudo apt install gkrellm. Upon first run, you need to enable the necessary plugins.

Navigate to the Plugins configuration to activate the “Sensors” plugin. This will populate the dashboard with readouts from lm-sensors. You can then drag and stack monitors to create a compact, personalized display.

Feature Psensor GKrellM
Best For Detailed graphs & alerts Persistent desktop dashboard
Customization Moderate (charts & alerts) High (plugins & layout)
Resource Usage Low to Moderate Very Low
Data Logging Basic session logging Requires additional plugins
Pro Tip: For a comprehensive view, run GKrellM for a persistent dashboard and open Psensor when you need to investigate a specific voltage graph or set an alert.

Interpreting Voltage Readings and Troubleshooting

Reading the numbers is only half the battle; understanding what they mean is crucial. This section explains how to interpret voltage data and diagnose common hardware problems. Accurate interpretation helps you maintain system stability and prevent damage.

Safe Voltage Ranges

Voltage readings must stay within specified tolerances for safe operation. The ATX standard defines acceptable ranges for power supply rails. Significant deviations often indicate a failing component.

Here are the key voltage rails and their nominal values with standard tolerances:

  • +12V Rail: Nominal 12.0V. A safe range is typically between 11.4V and 12.6V. This rail powers critical components like the CPU and GPU.
  • +5V Rail: Nominal 5.0V. It should stay within 4.75V and 5.25V. It often powers drives and USB controllers.
  • +3.3V Rail: Nominal 3.3V. Look for readings between 3.14V and 3.47V. This rail is used for RAM and some chipset functions.
  • CPU Vcore: Varies greatly by processor. Modern CPUs dynamically adjust from below 1.0V to over 1.4V under load. Consistency is more important than a specific value.

Diagnosing Common Hardware Issues

Abnormal voltage readings are strong indicators of specific hardware failures. By correlating symptoms with sensor data, you can pinpoint the likely culprit.

If the +12V rail reads significantly low (e.g., below 11.4V), your system may experience random crashes under load. This is a classic sign of an aging or failing power supply unit (PSU).

Consistently high voltage readings across multiple rails can also be dangerous. This can lead to excessive heat and accelerated wear on your CPU, motherboard, and RAM. It may point to a faulty voltage regulator module (VRM) on the motherboard.

Critical Warning: If you observe voltages consistently outside the safe tolerances, especially on the +12V rail, you should investigate your power supply immediately. A failing PSU can damage other components.

Advanced Monitoring with Stress Tests

To see how voltages behave under load, combine monitoring with a stress test. Use a tool like stress-ng or s-tui to put your CPU under maximum load.

While the stress test runs, monitor your voltages with watch sensors or Psensor. Observe if the Vcore drops excessively (v-droop) or if the main +12V rail sags. This reveals the true quality of your system’s power delivery under pressure.

Advanced Command-Line Techniques and Scripting

For power users and system administrators, automating voltage monitoring is key. This section covers advanced terminal commands and scripting methods. These techniques enable proactive system health management and logging.

Filtering and Parsing Sensor Output

Raw sensors output can be verbose. Use command-line tools to extract only the data you need. This is essential for clean logging or integration with other scripts.

To get just the +12V line, use grep: sensors | grep '+12V'. For a cleaner output showing only the numeric value, chain awk: sensors | grep '+12V' | awk '{print $2}'. This strips away labels and leaves just the voltage number.

  • Extract Vcore: sensors | grep 'Vcore' | head -1 | awk '{print $2}'
  • Check all 3.3V readings: sensors | grep '3.3V'
  • Get chipset voltage: sensors | grep -i 'vin\|vvrm'

Creating Automated Monitoring Scripts

You can write simple Bash scripts to log voltages at intervals. This creates a valuable dataset for diagnosing intermittent issues. The script below logs the +12V rail every 30 seconds.

Create a file called log_voltage.sh and make it executable with chmod +x log_voltage.sh. The script uses a loop to append timestamped data to a log file.

Example Script:

#!/bin/bash
LOGFILE="/var/log/voltage_monitor.log"
while true; do
TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')
VOLTAGE=$(sensors | grep '+12V' | awk '{print $2}')
echo "$TIMESTAMP - +12V: $VOLTAGE" >> $LOGFILE
sleep 30
done

Monitoring Voltage Remotely via SSH

For headless servers or remote machines, you can check voltages over SSH. This is a vital skill for managing Linux systems in data centers or as part of a homelab.

Use a simple SSH command to execute the sensors command on the remote host: ssh user@remote-server "sensors". You can pipe this output through the same filtering commands for a clean readout.

For ongoing remote monitoring, combine SSH with the watch command locally: watch -n 5 'ssh user@remote-server "sensors | grep +12V"'. This creates a local terminal that polls the remote voltage every 5 seconds.

Fixing Common Problems and Sensor Detection Issues

Sometimes, checking voltage on Linux doesn’t work as expected. Sensors may not appear, or readings can be inaccurate. This troubleshooting guide solves the most frequent hardware monitoring problems.

Solving “No Sensors Found” Errors

If the sensors command returns no data, your kernel modules are likely not loaded. The sensors-detect script generates a configuration but doesn’t always load modules automatically.

First, check if the necessary kernel modules are loaded with lsmod | grep coretemp (for Intel CPUs) or lsmod | grep k10temp (for AMD). If nothing appears, you must manually load them.

  1. Identify needed modules: Review the end of your sensors-detect output. It suggests modules like coretemp or nct6775.
  2. Load the module: Use sudo modprobe [module_name] (e.g., sudo modprobe coretemp).
  3. Make it permanent: Add the module name to /etc/modules so it loads on every boot.

Addressing Inaccurate or Missing Voltage Readings

Your motherboard may have sensors that lm-sensors doesn’t recognize by default. This results in missing or clearly wrong values (like +12V showing as 0.00V). Updating your configuration is the solution.

You need to find the correct chip driver and potentially a manual configuration. Check the detailed chip detection by running sensors-detect --auto and carefully note the chip IDs it finds.

  • Consult the lm-sensors wiki: Search for your motherboard or sensor chip model for known configurations.
  • Manual chip bus: You may need to specify the chip bus address in /etc/sensors3.conf or /etc/sensors.d/ files.
  • Kernel update: A newer kernel often includes support for newer hardware sensors.
Quick Fix: For many users, simply running sudo sensors-detect --auto and answering ‘YES’ to all probes, followed by a system reboot, resolves missing sensor issues.

When Software Monitoring Isn’t Enough

In rare cases, software readings may be unreliable due to a motherboard limitation. If you suspect a critical power supply fault, software data alone is insufficient for diagnosis.

For absolute verification, you need hardware tools. A digital multimeter (DMM) is the definitive way to check PSU voltage rails. You can measure the +12V, +5V, and +3.3V directly from a motherboard connector.

Consider a hardware solution if you manage critical servers. A networked PDU (Power Distribution Unit) or a motherboard with a dedicated BMC (Baseboard Management Controller) provides hardware-level voltage monitoring independent of the host OS.

Best Practices for Ongoing System Voltage Health

Proactive monitoring is better than reactive troubleshooting. Establishing good habits ensures long-term system stability and early problem detection. This section outlines a routine for maintaining optimal voltage health on your Linux machine.

Establishing a Regular Monitoring Routine

Don’t wait for a crash to check your voltages. Integrate quick checks into your regular system maintenance. This helps you establish a baseline for what “normal” looks like on your specific hardware.

Create a simple weekly check. Run the sensors command and quickly scan the key rails. Note any values that seem consistently higher or lower than your recorded baseline. A small deviation over time can signal a developing issue.

  • Weekly: Quick visual check of all voltage rails using sensors or Psensor.
  • Monthly: Perform a brief stress test (e.g., 5 minutes of stress-ng --cpu 0) while monitoring for significant voltage drops (sag).
  • After Hardware Changes: Always check voltages after installing new components like a GPU, additional drives, or a new CPU cooler.

Documenting Your Voltage Baseline

A baseline is your system’s voltage profile at idle and under load when it’s known to be stable. Documenting this provides a critical reference point for future comparisons.

To create your baseline, record sensor outputs in two states. First, at idle after a fresh boot with minimal processes running. Second, under a sustained CPU and GPU load using tools like stress-ng and glmark2.

State What to Record Tool to Use
Idle Baseline +12V, +5V, +3.3V, Vcore, Temperatures sensors > idle_baseline.txt
Load Baseline Same voltages, noting any sag from idle values Psensor (for graphs) or watch sensors

Setting Up Proactive Alerts

For servers or critical workstations, automated alerts are essential. You can configure tools to notify you before a voltage-related failure occurs.

In Psensor, you can set alerts through the GUI. Right-click on any voltage sensor and select “Alarm”. Set thresholds just outside your documented safe baseline to get an early warning.

For a script-based approach, extend the logging script from the previous section. Add an if statement to compare the read voltage against a threshold. If it’s out of bounds, trigger a notification using notify-send or send an email alert.

Final Pro Tip: Keep your monitoring tools and kernel updated. Newer versions of lm-sensors and the Linux kernel include improved support for modern hardware, leading to more accurate and reliable voltage readings.

Alternative Methods and Niche Monitoring Tools

Beyond lm-sensors, other specialized tools can provide voltage insights. These alternatives are useful for specific hardware, containers, or unique diagnostic scenarios. Exploring them gives you a more complete system health picture.

Checking Power Data from /sys Filesystem

The Linux kernel exposes some power and voltage data directly via the /sys virtual filesystem. This is a lower-level method that doesn’t require the lm-sensors daemon. The data is often found under paths related to ACPI (Advanced Configuration and Power Interface).

Navigate to /sys/class/power_supply/ to see detected power sources. Each directory (like BAT0 for a battery or AC for adapter) may contain voltage files. Use cat to read them, for example: cat /sys/class/power_supply/BAT0/voltage_now.

  • AC Adapter Voltage: Check /sys/class/power_supply/AC/voltage_now on laptops.
  • Battery Info: Files like voltage_min_design and voltage_now in battery directories.
  • Limitations: This method typically shows battery/AC input voltage, not the detailed motherboard rail voltages provided by lm-sensors.

Using ipmitool for Server Hardware

Enterprise servers with a Baseboard Management Controller (BMC) offer independent hardware monitoring. The ipmitool command-line utility can query this controller even if the host OS is unresponsive.

Install it with sudo apt install ipmitool. You can then fetch Sensor Data Records (SDR) which include voltage readings from the BMC’s perspective. The command sudo ipmitool sdr type voltage will list all voltage-related sensors.

This is invaluable for remote data center management. It allows you to check a server’s vital signs from its dedicated management network interface, completely separate from the main operating system.

GPU-Specific Voltage Monitoring

Modern graphics cards have their own complex power delivery systems. While lm-sensors might show some GPU data, dedicated tools offer deeper insight. This is critical for overclocking stability and diagnosing GPU-related crashes.

For NVIDIA GPUs, the nvidia-smi command is primary. While it focuses on power draw in watts, related tools or BIOS mods can expose voltage. For AMD GPUs on open-source drivers, the rocm-smi tool or reading from /sys/class/drm/card0/device/hwmon/ directories can provide data.

Tool Selection Summary: Use lm-sensors for motherboard/CPU rails, /sys/class/power_supply/ for laptop input power, ipmitool for servers with BMC, and vendor tools (nvidia-smi) for detailed GPU voltage/power data.

Conclusion: Mastering Voltage Monitoring on Linux

Checking voltage on Linux is a vital skill for system stability and health. You now have multiple methods, from simple terminal commands to advanced graphical tools. This knowledge helps you prevent crashes and diagnose hardware failures early.

The key takeaway is to establish a voltage baseline for your system. Regular monitoring against this baseline is your best defense. Start by running sudo sensors-detect and exploring the sensors output today.

Integrate these checks into your routine maintenance. Your system’s reliability will thank you for the proactive care. You are now equipped to ensure optimal performance and longevity for your Linux machine.

Frequently Asked Questions about Checking Voltage on Linux

What is the most reliable command to check voltage in Linux terminal?

The lm-sensors package provides the most reliable command: sensors. After installation and running sudo sensors-detect, this command displays all detected hardware voltages, temperatures, and fan speeds. It works with most motherboards and provides standardized, readable output.

For continuous monitoring, pair it with watch -n 2 sensors to update readings every two seconds. This combination gives you real-time insight into your system’s power delivery health directly from the command line.

How do I fix “No sensors found” error when checking voltage?

The “No sensors found” error means the necessary kernel modules aren’t loaded. First, ensure you’ve run sudo sensors-detect and answered ‘yes’ to all probes. Then, manually load the suggested modules with sudo modprobe [module_name].

Common modules include coretemp for Intel CPUs or k10temp for AMD. To make the fix permanent, add the module names to your /etc/modules file. A system reboot often finalizes the configuration.

What are safe voltage ranges for +12V, +5V, and +3.3V rails?

Safe voltage ranges follow the ATX power supply specification. The +12V rail should stay between 11.4V and 12.6V. The +5V rail’s safe range is 4.75V to 5.25V, while the +3.3V rail should read between 3.14V and 3.47V.

Consistent readings outside these tolerances often indicate a failing power supply. The CPU Vcore varies dynamically but should remain stable under load without excessive droop. Monitor for trends, not just single readings.

Which is better for voltage monitoring: command line or GUI tools?

The best tool depends on your use case. Command-line tools like lm-sensors are superior for servers, scripting, and remote SSH access. They are lightweight and easily automated for logging and alerting purposes.

GUI tools like Psensor are better for desktop users who prefer visual graphs and easy alert configuration. They provide an at-a-glance overview and are excellent for spotting trends through real-time charting of voltage fluctuations.

How can I monitor voltage on a headless Linux server remotely?

Use SSH to execute the sensors command on the remote server. The basic command is ssh user@server-ip "sensors". For continuous remote monitoring, use watch locally: watch -n 10 'ssh user@server-ip "sensors | grep +12V"'.

For enterprise servers with a BMC, use ipmitool over the management network. This provides hardware-level monitoring independent of the host OS status, which is crucial for diagnosing power issues on unresponsive systems.

Why are my voltage readings zero or clearly incorrect in Linux?

Zero or incorrect readings usually mean lm-sensors has misidentified your hardware chip. The automatic detection may have chosen the wrong driver. You need to manually configure the correct chip in /etc/sensors3.conf or a file in /etc/sensors.d/.

Research your motherboard’s sensor chip model online. Check the lm-sensors documentation or wiki for known configurations. Updating your kernel and lm-sensors package to the latest version can also resolve support for newer hardware.

What is the best way to log voltage data over time for analysis?

Create a simple Bash script that appends timestamped sensor data to a file. Use a while loop with the sensors command and sleep for intervals. Redirect the output to a log file like voltage_history.log.

For graphical analysis, use Psensor’s built-in logging feature or configure a monitoring system like Netdata or Grafana. These tools can create detailed historical charts, making it easy to correlate voltage drops with system events or crashes.

Can I check GPU voltage using standard Linux tools?

Standard lm-sensors may show limited GPU voltage data if your GPU exposes it. For detailed GPU monitoring, use vendor-specific tools. For NVIDIA cards, use nvidia-smi alongside community tools that can query more sensors.

For AMD GPUs using the open-source amdgpu driver, check the /sys/class/drm/card0/device/hwmon/ directory. Each GPU is different, so consult your specific model’s documentation for the most accurate voltage monitoring methods.