/ 中存储网

告诉你Ubuntu battery 笔记本电池信息查询的方法及命令

2015-04-25 21:34:09 来源:中存储网

现在用的是X201,装的是Ubuntu,前两天换了9芯的电池,想看看是不是零充电,充电的百分比都看不到,后来发现如下的方法,值得留下,备用。

在Ubuntu里,电池所有相关的信息都在 /proc/acpi/battery/BAT0/ 文件夹下的文件中记录着,好像笔记本都是BAT0,因为大都只有一块电池哦,这个文件夹下有alarm info state 三个文件,终端下输入:

cat /proc/acpi/battery/BAT0/info

present: yes

design capacity: 8424 mAh

last full capacity: 8492 mAh

battery technology: rechargeable

design voltage: 10800 mV

design capacity warning: 424 mAh

design capacity low: 18 mAh

cycle count: 0

capacity granularity 1: 1 mAh

capacity granularity 2: 1 mAh

model number: 42T4649

serial number: 261

battery type: LION

OEM info: SANYO

cat /proc/acpi/battery/BAT0/state

present: yes

capacity state: ok

charging state: discharging

present rate: 1555 mA

remaining capacity: 1631 mAh

present voltage: 11094 mV

cat /proc/acpi/battery/BAT0/alarm

alarm: 424 mAh

看看还是很详细的,比Thinkpad自带的还好,另外发现一个图形的界面,如下操作:

Alt+F2,输入“gnome-power-statistics”