Power consumption

I need a command line tool, which would display, system's current power consumption.
And I am not talking about laptop, but a desktop.

It might also be in real time.

For example, I aim on adding another 160GB HD.
This tool would show me, is current power supply adequate, regarding all other power sucking components. ;)
 
Ha ha! Very funny.
Someone has been sarcastic. :P

LOL!

This is FreeBSD!
So it must be possible, as FreeBSD is alpha and omega. ;)
 
No, it's simply not possible as the data isn't available. Without any sensors in the PSU there's no way to tell how much power is being consumed.
 
killasmurf86 said:
It's not a command line tool, but it's the best: http://en.wikipedia.org/wiki/Multimeter also take a look at See Also section :)

What you need is more like http://en.wikipedia.org/wiki/Wattmeter.

Even if there was a command line tool available, it would not be of much worth, as it probably would only measure DC Watts. But when it comes to power consumption, you want to know how much AC Watts your PC drains from the mains, which in turn depends on the efficiency of your PSU :e
 
mickey said:
What you need is more like http://en.wikipedia.org/wiki/Wattmeter.

Even if there was a command line tool available, it would not be of much worth, as it probably would only measure DC Watts. But when it comes to power consumption, you want to know how much AC Watts your PC drains from the mains, which in turn depends on the efficiency of your PSU :e

As I said, see See Also section.
I picked multimeter, because they usually have everything you ever need
 
I don't think desktop boards have the circuitry and ACPI facilities to give you the information you want, and not even all laptops do either. For laptops that do, there's acpiconf(8).
 
mickey said:
...Even if there was a command line tool available, it would not be of much worth, as it probably would only measure DC Watts. But when it comes to power consumption, you want to know how much AC Watts your PC drains from the mains, which in turn depends on the efficiency of your PSU :e

So, it would be viable, only if PSU, would be one, to provide power consumption data, to the OS.
Then, that depends on PSU manufacturer, to implement that tech. :stud
 
Only server and workstation grade hardware provide this kind of data via sensor. And most of them dependents upon proprietary drivers and java front ends. Few drivers are there in both Linux / FreeBSD that support command line options via ipmitool to read the data via CLI. But as I said you really need server or workstation grade hardware.
 
I had a thought about this while in the shower last night. If you're into hardware hacking, you could buy several of the $2-3 multimeters from Harbor Freight and use these for what you want.

Basically, take each multimeter apart. Discard the shroud. Find out how the switch works and short out the correct contacts so that it thinks it's always set in the same position. Discard the dial switch. This basically leaves an LCD with a few circuit boards and a battery. Wire up the battery supply wires to your PSU (I'm guessing that the 3.3 and 5 volt rails would be enough to power it in place of the 9-volt battery), or just leave the battery in. If you like neither of these, it'd be trivial to wire up a standard 9 volt AC-DC transformer to power the whole bank of multimeters. Solder a chunk of wire from where the probes end up in the multimeter and splice the other ends into your various PSU wires. You can either mount the contraption on the inside of your case so that only the LCD is visible. Better yet, build an enclosure for many of these LCDs and have a group of wires with a plug hanging off of it; the mate of this plug would be accessible on the outside of your case and you could plug it in at will. (I'm visualizing something like a 20-pin ATX power molex connector - 2 pins for power and the rest for signaling. If 9 sensors aren't enough, you'd have to find something else.)

BAM - you have a device that can measure just about any property of each power rail coming from your PSU. What you can monitor is solely dependent on how many multimeters you want to cannibalize and how big you want to limit the device to.
 
If you want to know the total effective power consumption, you will
have to use an expensive power meter which has all the features like GPIB, USB connection, etc...
Otherwise you can find a second hand ammeter, voltmeter and power factor meter, where: P = U.I.cos(phi)
 
Ok, guys, thanks, but that is, kind of, an overkill for me. :P
If I would really badly need this feature, than I would go for some nasty hardcore hacking... ;)
 
On OpenBSD I can see the power consumption with the hw.sensors sysctl (hw.sensors.acpibat0.raw1 to be precise) for my thinkpad.

I'm not sure if FreeBSD also has such an sysctl, you can try checking the acpi_battery and acpi_ibm manpages (Last one being Thinkpad specific).

The availability of this kind of information also greatly varies with laptop models.
 
[cmd=c:\>]acpiconf -i0[/cmd] will give your battery discharge rate, if the ac line isn't plugged in. I'm not sure that is entirely useful, though, since that can vary a LOT from second to second.
 
Carpetsmoker said:
On OpenBSD I can see the power consumption with the hw.sensors sysctl (hw.sensors.acpibat0.raw1 to be precise) for my thinkpad.

I'm not sure if FreeBSD also has such an sysctl, you can try checking the acpi_battery and acpi_ibm manpages (Last one being Thinkpad specific).

The availability of this kind of information also greatly varies with laptop models.


http://www.leidinger.net/blog/2009/12/06/freenas-sensors-for-freebsd/

There isn't much of a framework in FreeBSD and there are some people eager to avoid such things.
 
I use a device called Kill-A-Watt... Its a great device.
Highly recommended for tracking down wasted energy and tracking energy usage. At the moment my desktop is running at a nice and cool 111 watts (), before installing 8-Rel it was consuming much more power :)

A software solution would be nice but I am not sure if it is really worth the effort, at least for me. There are plenty of sites which explain how to calculate system load for choosing a PSU size. Its not that hard to calculate... To bad a Kill-A-Watt cant do that also, it only works on 120v ;)
 
Back
Top