Re: system call to check battery energy?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vinod,
> Hi All. 

> Would anyone know if i could make a simple system call
> and find the battery energy remaining?
You could read the file "/proc/apm".  The number with the "%"
after it is the battery level.  The two hex numbers before it
are flags, such as whether or not AC power is present, etc.
You could either read the doc, read the Kernel source, etc.
to determine the meanings of these flags or experiment.

> I am relatively new to linux, but i have uncovered
> that apm and acpi are power management tools. trying
> apm gives me the lifetime  ,not in terms of energy say
> in terms of mAh. acpi on the other hand does
> seem(havent tried it yet) to give me values in terms
> of energy. But i was wondering if there is a way i can
> just do a system call and find the energy value than
> having to configure acpi. Would appreciate any
> pointers.

> Thanks,
> Vinod 

Best regards,

Bob Toxen, CTO
Fly-By-Day Consulting, Inc.
d/b/a Horizon Network Security
"Your expert in Firewalls, Virus and Spam Filters, VPNs,
Network Monitoring, and Network Security consulting"

http://www.verysecurelinux.com       [Network & Linux/Unix Security Consulting]
http://www.realworldlinuxsecurity.com [My 5* book: "Real World Linux Security"]
http://www.verysecurelinux.com/sunset.html                    [Sunset Computer]
bob@xxxxxxxxxxxxxxxxxxx (e-mail)
-
To unsubscribe from this list: send the line "unsubscribe linux-laptop" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux ACPI]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]
  Powered by Linux