smithi at nimnet.asn.au
Fri Dec 14 03:56:01 PST 2007
On Fri, 14 Dec 2007, [ISO-8859-9] cihan kömeçoðlu wrote:
> I need to mesaure laptop's energy.
> How can I do? I searched any program but I can't find.
The best way is to borrow an inline or clamp wattmeter to actually
measure real power usage of your laptop + adaptor/charger in use.
'acpiconf -i0' (assuming battery #0) should tell you quite a bit about
present entire power usage in milliWatts, while running on battery. You
may need to take several readings with one load, there's some time lag.
I think 'Present rate' while charging refers to battery charging rate
rather than usage, or perhaps it includes usage too.
Assuming your laptop runs ACPI and has cpu frequency control, you can
run 'powerd -v' in foreground mode in a console for a given interval,
say 10 minutes, and when you exit powerd by ^C you'l be told how many
Joules have been used (by the CPU anyway). I don't know the conversion
factor between Joules and Watt-hours.
CPU usage may or may not indicate something like half of the total power
consumed by the laptop - it does on my T23 when running at full speed
anyway, but it's not really modern. 'sysctl dev.cpu.0.freq_levels'
shows CPU power usage at each of the various speeds, in milliWatts.
Failing that, you'll have to rely on manufacturer's specs, or methods
like dividing the battery's rated capacity by how long it will run the
machine, but that depends on battery condition (see acpiconf -i0 again)
More information about the freebsd-acpi