Display `/proc/acpi/battery/BAT0/info` from the command line
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
On a fresh Debian/stable 9.5 installation on a MacBookPro10,1, I am trying to display acpi info from the command line.
Here is what I see:
$ find /proc/acpi/
/proc/acpi/
/proc/acpi/button
/proc/acpi/button/lid
/proc/acpi/button/lid/LID0
/proc/acpi/button/lid/LID0/state
/proc/acpi/wakeup
But acpi
seems to see the battery anyway:
$ acpi -V
Battery 0: Discharging, 46%, 01:17:56 remaining
Battery 0: design capacity 8460 mAh, last full capacity 7415 mAh = 87%
Adapter 0: off-line
Cooling 0: Processor 0 of 17
Cooling 1: Processor 0 of 17
Cooling 2: Processor 0 of 17
Cooling 3: BAT0 no state information available
Cooling 4: Processor 0 of 17
Cooling 5: intel_powerclamp no state information available
Cooling 6: Processor 0 of 17
Cooling 7: Processor 0 of 17
Cooling 8: Processor 0 of 17
Cooling 9: x86_pkg_temp no state information available
Cooling 10: Processor 0 of 17
What am I missing from the installation to get proper battery info from /proc/acpi
interface ?
linux debian acpi
add a comment |Â
up vote
0
down vote
favorite
On a fresh Debian/stable 9.5 installation on a MacBookPro10,1, I am trying to display acpi info from the command line.
Here is what I see:
$ find /proc/acpi/
/proc/acpi/
/proc/acpi/button
/proc/acpi/button/lid
/proc/acpi/button/lid/LID0
/proc/acpi/button/lid/LID0/state
/proc/acpi/wakeup
But acpi
seems to see the battery anyway:
$ acpi -V
Battery 0: Discharging, 46%, 01:17:56 remaining
Battery 0: design capacity 8460 mAh, last full capacity 7415 mAh = 87%
Adapter 0: off-line
Cooling 0: Processor 0 of 17
Cooling 1: Processor 0 of 17
Cooling 2: Processor 0 of 17
Cooling 3: BAT0 no state information available
Cooling 4: Processor 0 of 17
Cooling 5: intel_powerclamp no state information available
Cooling 6: Processor 0 of 17
Cooling 7: Processor 0 of 17
Cooling 8: Processor 0 of 17
Cooling 9: x86_pkg_temp no state information available
Cooling 10: Processor 0 of 17
What am I missing from the installation to get proper battery info from /proc/acpi
interface ?
linux debian acpi
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
On a fresh Debian/stable 9.5 installation on a MacBookPro10,1, I am trying to display acpi info from the command line.
Here is what I see:
$ find /proc/acpi/
/proc/acpi/
/proc/acpi/button
/proc/acpi/button/lid
/proc/acpi/button/lid/LID0
/proc/acpi/button/lid/LID0/state
/proc/acpi/wakeup
But acpi
seems to see the battery anyway:
$ acpi -V
Battery 0: Discharging, 46%, 01:17:56 remaining
Battery 0: design capacity 8460 mAh, last full capacity 7415 mAh = 87%
Adapter 0: off-line
Cooling 0: Processor 0 of 17
Cooling 1: Processor 0 of 17
Cooling 2: Processor 0 of 17
Cooling 3: BAT0 no state information available
Cooling 4: Processor 0 of 17
Cooling 5: intel_powerclamp no state information available
Cooling 6: Processor 0 of 17
Cooling 7: Processor 0 of 17
Cooling 8: Processor 0 of 17
Cooling 9: x86_pkg_temp no state information available
Cooling 10: Processor 0 of 17
What am I missing from the installation to get proper battery info from /proc/acpi
interface ?
linux debian acpi
On a fresh Debian/stable 9.5 installation on a MacBookPro10,1, I am trying to display acpi info from the command line.
Here is what I see:
$ find /proc/acpi/
/proc/acpi/
/proc/acpi/button
/proc/acpi/button/lid
/proc/acpi/button/lid/LID0
/proc/acpi/button/lid/LID0/state
/proc/acpi/wakeup
But acpi
seems to see the battery anyway:
$ acpi -V
Battery 0: Discharging, 46%, 01:17:56 remaining
Battery 0: design capacity 8460 mAh, last full capacity 7415 mAh = 87%
Adapter 0: off-line
Cooling 0: Processor 0 of 17
Cooling 1: Processor 0 of 17
Cooling 2: Processor 0 of 17
Cooling 3: BAT0 no state information available
Cooling 4: Processor 0 of 17
Cooling 5: intel_powerclamp no state information available
Cooling 6: Processor 0 of 17
Cooling 7: Processor 0 of 17
Cooling 8: Processor 0 of 17
Cooling 9: x86_pkg_temp no state information available
Cooling 10: Processor 0 of 17
What am I missing from the installation to get proper battery info from /proc/acpi
interface ?
linux debian acpi
linux debian acpi
asked Oct 1 at 7:33
malat
452622
452622
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Looking through the system calls executed by acpi
on my Ubuntu:
~ strace -e open,chdir acpi
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
chdir("/sys/class") = 0
chdir("power_supply") = 0
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("BAT0/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
open("BAT0/power_now", O_RDONLY) = 4
open("BAT0/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
open("BAT0/energy_now", O_RDONLY) = 4
open("BAT0/voltage_now", O_RDONLY) = 4
...
So it seems to be reading information from /sys/class/power_supply/*
.
Since the functionality is provided in /sys/class/power_supply/*
and since Debian kernel is build without CONFIG_ACPI_PROCFS_POWER
:
$ grep CONFIG_ACPI_PROCFS_POWER /boot/config-$(uname -r)
# CONFIG_ACPI_PROCFS_POWER is not set
You will not see anything anymore in /proc/acpi/battery/*
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Looking through the system calls executed by acpi
on my Ubuntu:
~ strace -e open,chdir acpi
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
chdir("/sys/class") = 0
chdir("power_supply") = 0
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("BAT0/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
open("BAT0/power_now", O_RDONLY) = 4
open("BAT0/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
open("BAT0/energy_now", O_RDONLY) = 4
open("BAT0/voltage_now", O_RDONLY) = 4
...
So it seems to be reading information from /sys/class/power_supply/*
.
Since the functionality is provided in /sys/class/power_supply/*
and since Debian kernel is build without CONFIG_ACPI_PROCFS_POWER
:
$ grep CONFIG_ACPI_PROCFS_POWER /boot/config-$(uname -r)
# CONFIG_ACPI_PROCFS_POWER is not set
You will not see anything anymore in /proc/acpi/battery/*
add a comment |Â
up vote
2
down vote
accepted
Looking through the system calls executed by acpi
on my Ubuntu:
~ strace -e open,chdir acpi
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
chdir("/sys/class") = 0
chdir("power_supply") = 0
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("BAT0/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
open("BAT0/power_now", O_RDONLY) = 4
open("BAT0/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
open("BAT0/energy_now", O_RDONLY) = 4
open("BAT0/voltage_now", O_RDONLY) = 4
...
So it seems to be reading information from /sys/class/power_supply/*
.
Since the functionality is provided in /sys/class/power_supply/*
and since Debian kernel is build without CONFIG_ACPI_PROCFS_POWER
:
$ grep CONFIG_ACPI_PROCFS_POWER /boot/config-$(uname -r)
# CONFIG_ACPI_PROCFS_POWER is not set
You will not see anything anymore in /proc/acpi/battery/*
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Looking through the system calls executed by acpi
on my Ubuntu:
~ strace -e open,chdir acpi
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
chdir("/sys/class") = 0
chdir("power_supply") = 0
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("BAT0/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
open("BAT0/power_now", O_RDONLY) = 4
open("BAT0/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
open("BAT0/energy_now", O_RDONLY) = 4
open("BAT0/voltage_now", O_RDONLY) = 4
...
So it seems to be reading information from /sys/class/power_supply/*
.
Since the functionality is provided in /sys/class/power_supply/*
and since Debian kernel is build without CONFIG_ACPI_PROCFS_POWER
:
$ grep CONFIG_ACPI_PROCFS_POWER /boot/config-$(uname -r)
# CONFIG_ACPI_PROCFS_POWER is not set
You will not see anything anymore in /proc/acpi/battery/*
Looking through the system calls executed by acpi
on my Ubuntu:
~ strace -e open,chdir acpi
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
chdir("/sys/class") = 0
chdir("power_supply") = 0
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("BAT0/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
open("BAT0/power_now", O_RDONLY) = 4
open("BAT0/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
open("BAT0/energy_now", O_RDONLY) = 4
open("BAT0/voltage_now", O_RDONLY) = 4
...
So it seems to be reading information from /sys/class/power_supply/*
.
Since the functionality is provided in /sys/class/power_supply/*
and since Debian kernel is build without CONFIG_ACPI_PROCFS_POWER
:
$ grep CONFIG_ACPI_PROCFS_POWER /boot/config-$(uname -r)
# CONFIG_ACPI_PROCFS_POWER is not set
You will not see anything anymore in /proc/acpi/battery/*
edited Oct 1 at 15:17
malat
452622
452622
answered Oct 1 at 7:47
Olorin
1,35411
1,35411
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f472516%2fdisplay-proc-acpi-battery-bat0-info-from-the-command-line%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password