Re: battery time living in Linux

From: Matthew Frost
Date: Fri Feb 23 2007 - 16:18:28 EST


Mockern wrote:
> Hello,
>
> I need to know how much time my battery will be alive (an embedded system).
>
> How does Linux calculate it? How should I know that after 3 or 4 hours my battery will be completely discharged?
>

Your battery will discharge at a rate proportionate to its total charge and the
wattage draw of the load (your embedded system, in this case) over time. If the
drain is constant, as opposed to variable, this becomes easier to predict.
However, your system load probably won't be constant. Also, the discharge rate
of a battery depends on the environment and age/condition of the battery.

I could just be missing something, but I am unaware of linux kernel
functionality for determining battery life. There are benchmarks that can give
you an estimate, but they are artificial. YMMV based on actual usage. Check
out Len Brown et al. from the 2006 Ottawa Linux Symposium on Linux Laptop
Battery Life, and adapt to suit. The only way to know for sure is to do the
tests yourself and get an idea of your average battery life.

Matt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/