On Mon, Jan 3, 2011 at 3:48 PM, Russell Senior <[email protected]> wrote:

> >>>>> "Denis" == Denis Heidtmann <[email protected]> writes:
>
> Denis> Thanks, Russell.  There is a file there named voltage_now,
> Denis> which seems to hold a recent voltage.  What system decides when
> Denis> to update that file?  Can I interrogate whatever writes that
> Denis> file to get more frequent updates? BAT0 is a link to BAT0 ->
> Denis>
> ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/PNP0C0A:00/power_supply/BAT0,
> Denis> for whatever that is worth.
>
> The /sys filesystem is a userspace view of various kernel values. For
> more information about sysfs, see:
>
>  http://en.wikipedia.org/wiki/Sysfs
>
> So, however often the kernel updates the battery information, that's
> how often the value in BAT0 updates.  From a shell, you can run:
>
>  watch -n 1 cat /sys/class/power_supply/BAT0/voltage_now
>
> to get an idea how fast it is updating.  It appears to be every few
> seconds.
>
> There are some other interesting values in
> /sys/class/power_supply/BAT0 too.  Figuring out what units they are
> using can sometimes be a challenge.
>
>
> --
> Russell Senior         ``I have nine fingers; you have ten.''
>

Fantastic!  I can see myself getting a curve out of this.

-Denis
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to