|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
How do I get the remaining battery percentage (6.2)
I used to be able to get the battery percentage in 6.0/6.1 using,
Code:
battatm=$(sysctl -n hw.sensors.acpibat0.amphour3 | sed s/.A.*//) battfull=$(sysctl -n hw.sensors.acpibat0.amphour0 | sed s/.A.*//) load=`echo "${battatm} / ${battfull} * 100" | bc` echo ${load}
__________________
Linux since 1999, & also a BSD user. |
|
|||
You can get all the information from the 'apm' command. man apm for commandline arguments.
|
|
|||
Thanks, I'll check that out.
Edit: Looks like apm -l will give me what I want, thanks for pointing me in the right direction.
__________________
Linux since 1999, & also a BSD user. Last edited by bsd-keith; 1st February 2018 at 07:15 PM. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
i7 temp. / battery life ? | NaWi | OpenBSD General | 2 | 8th August 2015 04:16 PM |
Shutting down on low battery | kmike | OpenBSD General | 5 | 30th March 2015 04:18 PM |
Beep low battery | tixx8542 | OpenBSD General | 8 | 25th December 2014 01:10 PM |
automatic or timed suspend on battery | asemisldkfj | OpenBSD General | 3 | 25th May 2011 11:55 PM |
Wireless networking xor battery monitor | Nobber | OpenBSD General | 5 | 27th February 2009 12:25 PM |