10

I use some custom scripts that use and monitor the battery information that was in:

/proc/acpi/battery/BAT0/(state|info)

However, since upgrading to 12.10 I no longer have those files and I've been unable to search for a replacement I can use.

Anyone know where they went or were replaced with? Where would I go to get current battery state, last charge capacity, original battery capacity, etc?

3 Answers 3

13

/sys/class/power_supply/BAT0 ?

2
  • 1
    Thanks, looks like my scripts will get a lot simpler since they've broken the data into several different files and require less parsing.
    – Rick
    Nov 8, 2012 at 1:01
  • Maybe you could post some of the scripts in your question as examples?
    – don.joey
    May 24, 2013 at 9:08
1

You can try installing acpi and then calling acpi -V to get info about batteries and temps for your machine.

sudo apt-get install acpi
acpi -V
0

This command is valid if your distro has the folder 'battery' in / proc / acpi, if that does not find this, the solution is not to create such a folder with mkdir command with root permissions (sudo mkdir) until same because the system does not allow the creation of folders in this directory when started, then the said resolution to the issue is to use a distro 'live CD' logically with its already installed on the HD, and finally create the folder 'battery' in / proc / acpi.

Well, it is not relevant to the issue discussed here in this topic, but the aforesaid distro technique of using 'live CD', to create folder distros already installed on HD, is useful even for recognition, for example, the USB port. Even for those who use virtual machine, this technique is especially useful if said machine virtualization for Virtual Box, as this is flawed at this point. The procedure under discussion, it is simple to create folders in / proc, creating subsequent folders, which are: / bus / usb. Like this: '/ proc / bus / usb'.

Now, back to this 'post', this topic. How to create the folder with 'live CD' if the distro I installed the HD out to use: "LVM"? Well, I will not explain not to escape the main subject, here goes: For those who can not use the command suprarelatado have this simple form, with the following alternatives:

Installing the 'package' acpi to;

Ubuntu and Debian "'s like":

su-c 'apt-get install acpi'

Fedora (the best in my opinion), or Red Hat's related:

su-c 'yum install acpi'

And then, finally, run: 'acpi' (without the quotes, of course, a logical corollary).

But the list of alternatives, do not stop there. Then install:

su-c 'yum install powertop'

Then run as super user: su-c 'powertop' (the powertop is the best of all, it updates itself).

We have, moreover, "gkrellm", add the battery option, remembering that this is GUI (ultra light). There is conky, but this is problematic because the distro has to have the folder 'battery' in / proc / acpi.

Regards to all, using the intelligence and use Linux. And, after all, be smart, no security flaw in gnome screesaver, to remove it if they will not be invaded. Indeed, the failure is for all 'bobinhos' linux screen savers. We go there, you know, one should use is: openbox or even fluxbox. These represent the Linux and not the "windows" likes "':" Gnome and worse, KDE ".

1
  • 1
    This site is English only can you please translate the question. May 24, 2013 at 5:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .