[ALUG] Wanted - simple way to check mains power is available
iDunno at sommitrealweird.co.uk
Thu Jan 27 10:33:59 GMT 2011
On 26 Jan 16:16, Chris G wrote:
> On Wed, Jan 26, 2011 at 03:51:14PM +0000, samwise wrote:
> > Chris,
> > Shouldn't you be able to get this info from your computer itself?
> > Something like:
> > cat /proc/acpi/battery/BAT0/state
> > Or maybe google for acpi or acm ... ?
> > The battery widgets which show you whether your battery is in use or
> > charging, must make use of this info.
> I thought someone would say that, I should have explained better. :-)
> The eeePc is running from an *external* battery supply, not from its own
> internal battery. Hence, from its point of view, 'mains' power will
> always be available and /proc/acpi/battery/BAT0/state won't change.
> I don't want to run it from a mains power supply and rely on its
> internal battery to last over any mains power failures. A mains power
> failure where it is might last for a day or two because it will probably
> be caused by local circuit breakers tripping and they will need someone
> to go and reset them.
Please define "external battery". Is this "external battery" a UPS unit?
If so, why not just query the UPS?
Brett Parker http://www.sommitrealweird.co.uk/
PGP Fingerprint 1A9E C066 EDEE 6746 36CB BD7F 479E C24F 95C7 1D61
More information about the main