* system call to check battery energy?
@ 2005-07-11 13:44 Vinod
2005-07-11 20:28 ` Bob Toxen
0 siblings, 1 reply; 2+ messages in thread
From: Vinod @ 2005-07-11 13:44 UTC (permalink / raw)
To: linux-laptop
Hi All.
Would anyone know if i could make a simple system call
and find the battery energy remaining?
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
____________________________________________________
Sell on Yahoo! Auctions – no fees. Bid on great items.
http://auctions.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-laptop" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: system call to check battery energy?
2005-07-11 13:44 system call to check battery energy? Vinod
@ 2005-07-11 20:28 ` Bob Toxen
0 siblings, 0 replies; 2+ messages in thread
From: Bob Toxen @ 2005-07-11 20:28 UTC (permalink / raw)
To: Vinod, linux-laptop
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@verysecurelinux.com (e-mail)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-11 20:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-11 13:44 system call to check battery energy? Vinod
2005-07-11 20:28 ` Bob Toxen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.