系统相关
首页 > 系统相关> > centos 电池

centos 电池

作者:互联网

CentOs7中查看电量剩余电量

  1. 查看CentOs7中电量剩余电量:cat /sys/class/power_supply/BAT0/capacity

 

[root@localhost ~]# cat /sys/class/power_supply/BAT0/capacity
100
[root@localhost ~]# ls  /sys/class/power_supply/BAT0/
alarm        device              energy_now    power      serial_number  technology  voltage_min_design
capacity     energy_full         manufacturer  power_now  status         type        voltage_now
cycle_count  energy_full_design  model_name    present    subsystem      uevent
[root@localhost ~]# cat   /sys/class/power_supply/BAT0/power
cat: /sys/class/power_supply/BAT0/power: Is a directory
[root@localhost ~]# cat   /sys/class/power_supply/BAT0/energy_full
45180000
[root@localhost ~]# cat /sys/class/power_supply/BAT0/capacity
100
[root@localhost ~]# 

 

标签:centos,power,supply,电池,sys,BAT0,class,localhost
来源: https://www.cnblogs.com/dream397/p/13720405.html