Re:Ask HN: Should I unplug my laptop charger at 100%?
by johnymontana on Monday May 04, 2015 @04:44PM
(#9489057)
Could you clarify how you arrived at 84% battery health? After the command "ioreg -l -n AppleSmartBattery -r" I see DesignCapacity, but where does the other number (5629) come from? I'd like to compute battery health myself...
[ Parent
| on HN ]
Re:Ask HN: Should I unplug my laptop charger at 100%?
by jffry on Monday May 04, 2015 @04:52PM
(#9489118)
running
ioreg -l -n AppleSmartBattery -r | grep -i capacity
gives me "MaxCapacity" = 8329
"CurrentCapacity" = 8002
"DesignCapacity" = 8440
I'm guessing MaxCapacity or CurrentCapacity (I'm at 100% charged on a ~1 year old MBP, so I don't know which number is appropriate)
Re:Ask HN: Should I unplug my laptop charger at 100%?
by ChristianBundy on Tuesday May 05, 2015 @12:04AM
(#9490791)
Your battery percentage is going to be:
100 / DesignCapacity * MaxCapacity
Or, in the way that makes way more sense to me: MaxCapacity / DesignCapacity * 100
Which, with your results, yields something to the effect of: 98.68%
It's kind of (read: very) dirty looking, but you can get the same result with: echo $(ioreg -l -n AppleSmartBattery -r | grep MaxCapacity | awk '{print $3}') / $(ioreg -l -n AppleSmartBattery -r | grep DesignCapacity | awk '{print $3}') \* 100 | bc -l
Re:Ask HN: Should I unplug my laptop charger at 100%?
by cgabios on Tuesday May 05, 2015 @04:56AM
(#9491520)
ioreg -l -n AppleSmartBattery -r | awk '/MaxCapacity/{mc=$3};/DesignCapacity/{dc=$3};END{print 100*mc/dc}'
Re:Ask HN: Should I unplug my laptop charger at 100%?
by critiq on Tuesday May 05, 2015 @07:34AM
(#9491916)
mine is at 103.211
Re:Ask HN: Should I unplug my laptop charger at 100%?
by bluedino on Monday May 04, 2015 @04:50PM
(#9489095)
He's just dividing the current battery capacity by the 'new' battery capacity. You can just let a program like Coconut Battery do it for you.
Re:Ask HN: Should I unplug my laptop charger at 100%?
by mauz0r on Tuesday May 05, 2015 @07:49AM
(#9491949)
Coconut Battery is nice. You can let it take snapshots and compare it with other batteries online. You can view my battery health here http://ccbonline.coconut-flavour.com/index.php?bid=d78a6c124.... I try to unplug at 100% and recharge it at 10-20%. Once per month I drain it all the way to 0%.
After reading this thread I try to keep my battery at a 50-80% charge :)
Except when I do some CPU intensive stuff like compiling or rendering, then it is being charged thought the process.