We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

ssh battery check [duplicate]

asked 2015-12-26 13:32:23 +0200

objectifnul gravatar image

Hi, is there a CLI command allowing to check battery and power status? This would be useful for remote device monitoring through SSH and Putty.

edit retag flag offensive reopen delete

The question has been closed for the following reason "duplicate question" by objectifnul
close date 2015-12-26 15:07:57.753443

Comments

2

Thx and sorry for not finding it.

objectifnul ( 2015-12-26 14:59:33 +0200 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2015-12-26 14:35:05 +0200

coderus gravatar image

cli: upower -d

edit flag offensive delete publish link more

Comments

Thx. Just forgot it.

objectifnul ( 2015-12-26 15:00:10 +0200 )edit
1

answered 2015-12-26 14:37:01 +0200

Self-Perfection gravatar image

Just use standard linux interface to battery readings: /sys/class/power_supply. On arbitrary device one has to skim through /sys/class/power_supply/*/type which devices a batteries. In case of Jolla:

$ head /sys/class/power_supply/battery/{capacity,current_now,status}
==> /sys/class/power_supply/battery/capacity <==
20

==> /sys/class/power_supply/battery/current_now <==
3120

==> /sys/class/power_supply/battery/status <==
Discharging

capacity is measured in percent of max charge.

edit flag offensive delete publish link more

Question tools

Follow
1 follower

Stats

Asked: 2015-12-26 13:32:23 +0200

Seen: 537 times

Last updated: Dec 26 '15