DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 1st February 2018
bsd-keith bsd-keith is offline
Real Name: Keith
Open Source Software user
 
Join Date: Jun 2014
Location: Surrey/Hants Border, England
Posts: 345
Default 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}
but it isn't working on 6.2, & I noticed amphour seems to be watthour now, but even changing that didn't work, something appears to have changed(?).
__________________
Linux since 1999, & also a BSD user.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 04:07 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick