Is there a way to return the current watt consumption on the command line? I have found about the powertop program, but have not seen a way to return the Watt consumption as a value to the command line. I'm thinking of some file that I can cat
or grep
.
Command Line – Return Value of Current Watt Consumption
power-management
Best Answer
On my system I can obtain the power drawn from the battery from
On Thinkpads if the
tp_smapi
module is loaded, the file isThe value seems to be in µW, though. You can convert it with any tool you're comfortable with, e.g.
awk
:In case you cannot find the location within the sysfs file system, you can search for it:
Additionally, the package
lm-sensors
may be used to determine the system power usage on some machines: