Ohm's Law

Ohm's Law
E = I * R E = Voltage (Volts V) E = P / I
I = E / R I = Current (Amps A) I = P / E
R = E / I R = Resistance (Ohms Ω)
P = Power (Watts W) P = E * I

lm-sensors can monitor the CPU voltage, and the current used, so it can derive the power (in watts) by calculating watts = voltage * current.

Answer from K7AAY on askubuntu.com
Discussions

embedded - power consumption of sensors - Electrical Engineering Stack Exchange
Depending on how often you measure the temperature you can compute the power consumption. ... \$\begingroup\$ @Megh this answers your question, doesn't it? 10-12 µA · supply voltage. So, accept this answer? \$\endgroup\$ ... \$\begingroup\$ IIf you have a LM35 then the quiescent current has ... More on electronics.stackexchange.com
🌐 electronics.stackexchange.com
How do you monitor power consumption?
PowerTop can be used to monitor power usage at the process level as described in How to monitor power usage in Linux , but it doesn't monitor total system power consumption (memory, drives, PSU, etc.), at least to my understanding. I use lm-sensors as described in How to install sensors (lm-sensors) on Ubuntu / Debian Linux for monitoring CPU core temperatures along with the Telegraf lm-sensors plugin for writing these to InfluxDB and displaying them in Grafana. Some have suggested this, but I don't see power consumption reported by lm-sensors on my servers, a mix of Supermicro X8 systems and Lenovo Tiny desktops. I have monitored power consumption using two methods: Initially, by running SNMP queries (in a Python script) to an APC AP7801 , networked, metered PDU. I bought this PDU (cheaply on eBay) with the expectation to monitor individual outlets, but I didn't dig deep enough before buying it and learned later that it reports only total power consumption for all outlets. Currently, I use the Telegraf apcupsd plugin on the host (Debian-based NAS) that monitors my APC BackUPS Pro 1500 through USB. This provides all information available in the apcaccess command, and also is written to InfluxDB and displayed in Grafana. Again, both of these methods monitor only total power consumption. There are two options for monitoring power consumption of individual systems: Use a networked, metered PDU that monitors power consumption by outlet rather than a total. These are available, for example the CyberPower PDU81004 Switched Metered-By-Outlet PDU, 100-240V/15A, 8 Outlets, 1U Rackmount , but can get pretty pricey. Use smart plugs that include power monitoring, like these TP-Link Kasa Matter Smart Plug w/ Energy Monitoring . More on reddit.com
🌐 r/homelab
20
11
August 14, 2023
Concerning power watt reading from lm-sensors
So what's the CPU temps then ? I would not worry about it that much, I noticed often the crit/warning values are wrong. A 15W TDP does not mean it cant go above. And I would assume Power1 is for the whole system, with disks etc. it makes sense. More on reddit.com
🌐 r/homelab
2
1
May 8, 2023
lm-sensors power measurement not read by sensors plugin
Version of collectd: 5.8.0.119.gca7b906 Operating system / distribution: Debian 9.5 Version of lm-sensors: 1:3.4.0-4 Expected behavior I have servers where running sensors shows two power sensors: ... More on github.com
🌐 github.com
4
August 23, 2018
🌐
Go Packages
pkg.go.dev › github.com › mdlayher › lmsensors
lmsensors package - github.com/mdlayher/lmsensors - Go Packages
type PowerSensor struct { // The name of the sensor. Name string // The average electrical power consumption, in watts, indicated // by the sensor. Average float64 // The interval of time over which the average electrical power consumption // is collected. AverageInterval time.Duration // Whether or not this sensor has a battery.
🌐
BinaryTides
binarytides.com › home › how to monitor cpu power consumption in watts on ubuntu
How to monitor cpu power consumption in watts on Ubuntu - BinaryTides
November 19, 2022 - lm-sensors did show the temperatures of individual cores of the cpu, but could not display the watts being consumed in realtime. Other commands like powertop and powerstat also were not able to show up the information i wanted.
🌐
Texas Instruments E2E
e2e.ti.com › support › sensors-group › sensors › f › sensors-forum › 273750 › power-consumption-by-lm-35-connected-to-5-volts
Power consumption by LM 35 connected to 5 Volts? - Sensors forum - Sensors - TI E2E support forums
May 11, 2021 - When you load the part the current flowing into the VS pin of the part will increase directly by the amount of load current. That is if you draw 50uA maximum by your load then the current flowing into the VS will go up from 158uA maximum to 208uA maximum for the LM35.
🌐
Reddit
reddit.com › r/homelab › how do you monitor power consumption?
r/homelab on Reddit: How do you monitor power consumption?
August 14, 2023 -

Since power usage (at least cpu-wise) is fairly easy to monitor in windows (hwinfo). Is there is a cli equivalent for linux?

Top answer
1 of 13
6
PowerTop can be used to monitor power usage at the process level as described in How to monitor power usage in Linux , but it doesn't monitor total system power consumption (memory, drives, PSU, etc.), at least to my understanding. I use lm-sensors as described in How to install sensors (lm-sensors) on Ubuntu / Debian Linux for monitoring CPU core temperatures along with the Telegraf lm-sensors plugin for writing these to InfluxDB and displaying them in Grafana. Some have suggested this, but I don't see power consumption reported by lm-sensors on my servers, a mix of Supermicro X8 systems and Lenovo Tiny desktops. I have monitored power consumption using two methods: Initially, by running SNMP queries (in a Python script) to an APC AP7801 , networked, metered PDU. I bought this PDU (cheaply on eBay) with the expectation to monitor individual outlets, but I didn't dig deep enough before buying it and learned later that it reports only total power consumption for all outlets. Currently, I use the Telegraf apcupsd plugin on the host (Debian-based NAS) that monitors my APC BackUPS Pro 1500 through USB. This provides all information available in the apcaccess command, and also is written to InfluxDB and displayed in Grafana. Again, both of these methods monitor only total power consumption. There are two options for monitoring power consumption of individual systems: Use a networked, metered PDU that monitors power consumption by outlet rather than a total. These are available, for example the CyberPower PDU81004 Switched Metered-By-Outlet PDU, 100-240V/15A, 8 Outlets, 1U Rackmount , but can get pretty pricey. Use smart plugs that include power monitoring, like these TP-Link Kasa Matter Smart Plug w/ Energy Monitoring .
2 of 13
4
My choice https://www.amazon.com/P3-P4400-Electricity-Usage-Monitor/dp/B00009MDBU
🌐
Reddit
reddit.com › r/homelab › concerning power watt reading from lm-sensors
r/homelab on Reddit: Concerning power watt reading from lm-sensors
May 8, 2023 -

Hello!

I have a fujitsu futro s920 pc I'm setting pfSense up on. I was a bit concerned about NIC temps so I loaded ubuntu on it to check the temps.

Running sensors command

fam15h_power-pci-00c4

Adapter: PCI Adapter

Power1: 20.40W (interval = 0.01 2, crit= 14.98W)

The other temps were fine but this was concerning to me. I assume it's the cpu since the critical Wattage is the same as the listed TDP. But it is reading 20w, is this safe? should I be concerned? cheers any help appreciated

Find elsewhere
🌐
Narkive
lm-sensors.lm-sensors.narkive.com › 5MI2vOwZ › wrong-output-with-fam15h-power
[lm-sensors] wrong output with fam15h_power
I've recently also seen that the values reported in idle state seem to be bogus values as the power consumption measured for the entire system is often less then the value reported by the driver for CPU power consumption. Hope that I can provide an explanation for this oddities soon. Sorry for the late update. It's possible to get reasonable idle values by adapting the power averaging period. (If interested in details, see description of D18F5xE0 Processor TDP Running Average in "BKDG for AMD Family 15h Models 00h-0Fh Processors".) (At your own risk) you can try the following: (You have to be
🌐
Linux.com
linux.com › home › topic › desktop › advanced lm-sensors tips and tricks on linux
Advanced lm-sensors Tips and Tricks on Linux - Linux.com
September 21, 2017 - Learn how to use lm-sensors to monitor CPU temperature, fan speeds, and motherboard voltages. CPUTIN is CPU temperature index, AUXTIN is auxiliary temperature index, and SYSTIN is system temperature index. These are all sensors on the motherboard. AUXTIN is the power supply temperature sensor, and SYSTIN measures motherboard temperature.
🌐
GitHub
github.com › collectd › collectd › issues › 2905
lm-sensors power measurement not read by sensors plugin · Issue #2905 · collectd/collectd
August 23, 2018 - power_meter-acpi-0 Adapter: ACPI interface power1: 165.00 W (interval = 1.00 s) power_meter-acpi-0 Adapter: ACPI interface power1: 169.00 W (interval = 60.00 s) I want collectd to read these measurements and send them to my Graphite instance.
Author   collectd
🌐
Unixmen
unixmen.com › home › linux distributions › lm-sensors: monitoring cpu and system hardware temperature
Lm-sensors: Monitoring CPU And System Hardware Temperature | Unixmen
It is very important to keep an eye on your system temperature. Because overheating may cause unexpected hardware failures. This brief tutorial describes how to monitor your CPU and other system hardware temperatures, fan speeds, and voltages using a command line utility called lm-sensors.
🌐
nixCraft
cyberciti.biz › nixcraft › howto › arch linux › linux read cpu temperature sensor chip data including voltage and fan speed with lm-sensors
Linux Read CPU Temperature, Voltage and Fan Speed Data - nixCraft
September 10, 2025 - You can use Linux hardware monitoring tool called lm_sensor. This tool provides some essential command line utilities for monitoring the hardware health of Linux systems containing hardware health monitoring hardware such as the LM78, LM75 and more. This tool use the System Management Bus (SMBus or SMB), which is a simple two-wire bus, derived from I²C and used for communication with low-bandwidth devices on a motherboard, especially power ...
🌐
ArchWiki
wiki.archlinux.org › title › Lm_sensors
lm_sensors - ArchWiki
May 27, 2024 - Tip The --auto flag may be used to automatically accept all safe answers for sensors-detect. When the detection is finished, a summary of the probes is presented. ... This program will help you determine which kernel modules you need to load to use lm_sensors most effectively.
Top answer
1 of 6
117

Once lm-sensors is installed you need to reach for your terminal:

type

sudo sensors-detect

just press ENTER for everything it suggests (shown in Uppercase)

At the end it will ask you whether to add what it finds to /etc/modules. If you are happy with the findings type "yes".

More information about lm-sensors and how to tailor it for your system can be found on the lm-sensors installation wiki page

Typing

sensors

will display the values for the sensors detected previously.

e.g.

acpitz-virtual-0
Adapter: Virtual device
temp1:       +55.0°C  (crit = +90.0°C)
2 of 6
33

lm-sensors

is a set of tools to control and view sensors that may be present on your hardware. Included are several applications that run from the command line:

  • sensors: shows the current readings of all sensor chips.
  • sensord: daemon to periodically log sensor readings to syslog
  • fancontrol: calculates fan speeds from temperatures and sets the corresponding PWM outputs
  • pwmconfig: tests the PWM outputs of sensors and configures fancontrol
  • and more (see lm-sensors documentation for details)

To run these programs open a terminal and type the name of the application (including optional parameters, see manpages for details). This will give an output similar as shown here for sensors:

~$ sensors

k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:  +30.0°C                                    
Core0 Temp:  +30.0°C                                    
Core1 Temp:  +29.0°C                                    
Core1 Temp:  +36.0°C                                    

it8718-isa-0228
Adapter: ISA adapter
[...] # shortened

Configuration of lm-sensors is done by configuration files in /etc/sensors3.conf and in /etc/sensors.conf (for details see manpage for sensors.conf).

🌐
Baeldung
baeldung.com › home › administration › finding the power consumption of a machine in linux
Finding the Power Consumption of a Machine in Linux | Baeldung on Linux
March 18, 2024 - The first step is to install the lm_sensors package with the package manager of our distribution. Then, we need to generate a list of the kernel modules: ... We should be careful if we modify the default options since this can cause screen issues. Just accepting the default options with Enter is the safest option. Once we’ve detected the sensors of our machine, we can get the instantaneous power...
🌐
NXP
community.nxp.com › t5 › Layerscape-Knowledge-Base › How-to-measure-power-using-sensors-and-stress-individual-cores › ta-p › 1167414
How to measure power using sensors and stress individual cores? - NXP Community
December 21, 2020 - The below steps describe how to measure the CPU power using sensors and also describe how to stress individual cores of CPU. Steps are explained with an example of LX2160A SoC. However, these steps are applicable to all Layerscape devices. Download Flexbuild and add packages in Ubuntu:Lite Generate...
🌐
GitHub
github.com › lm-sensors › lm-sensors › issues › 130
lm_sensors-3.4 get 4.29 MW Megawatts ?but it is 2U server · Issue #130 · lm-sensors/lm-sensors
power_meter-acpi-0 Adapter: ACPI interface power1: 4.29 MW (interval = 1.00 s) Please help me~ Thks. is it bug from lm_sensors-3.4 ???
Author   lm-sensors
🌐
Ubuntu Forums
ubuntuforums.org › showthread.php
Ubuntu Community Hub
October 15, 2009 - This is a space for discussions around Ubuntu, the community and the projects that bring them all together. We strive to keep this a welcoming and safe place for our community and therefore follow a simple Code of Conduct and honor an inclusive Diversity Policy · If you’re a newcomer to ...