Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am wondering whether there exists any way for me to periodically estimate the remaining battery energy level of a notebook running FC 5. Let me put it in a different way. Suppose that a notebook is disconnected from the main
power supply and hence it relies on its remaining battery energy for its operation. For my protocol to work, it needs to periodically check the power level, and if a notebook has sufficient energy only, it can be used. Having explained the requirement, my question now is how to access/grab such
low-level information under Fedora Core 5.
Thanks in advance for taking your invaluable time to answer my question.
Cheers
Siva
===============================
Dr. Siva Sivavakeesar
I have been trying to let my Routing protocol that runs as a daemaon in the user-space open and read the "state" file that appears under the directory /proc/acpi/battery/BATO/ in FC5 (I am not sure whether I can call it as a file per se). As you know, my objective is to read the remaining life-time of a battery by manipulating the rate
at which current is drawn and the total capacity. However, I find it difficult to open the required file/device probably because system continuously writes into "state" and as a result another thread cannot open it simultaneously. I have tried with fopen() and open() - both of them didn't work.
Does anybody have an idea as to how I can get around with this problem ?
Thanks in advance for taking your invaluable time to answer my question.
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790
Rep:
Have a look at the acpitool package, from man acpitool;
Code:
DESCRIPTION
acpitool is a Linux ACPI client. It simply reads /proc/acpi entries and
presents the output in a meaningfull, human-readable format.
It provides a.o. information on battery status, AC adapter presence,
thermal reading, etc. This command is most useful on laptops with an
ACPI compliant BIOS and a Linux kernel, preferably from the 2.6 series,
with ACPI enabled.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.