Apple MacBook Pro 13
Carlos Gonçalves
by Carlos Gonçalves

Categories

  • articles

Tags

  • apple
  • battery
  • coconutbattery
  • macbook

One year has passed since I bought my Apple MacBook Pro 13” (mid 2010) laptop, and at that time I blogged about it. One feature I demanded was good battery capacity

  • the MBP 13” seemed like a great choice and I did go for it.

By middle of August I discovered coconutBattery, an application that shows the current battery capacity, its designed capacity, and current and maximum charge, as well as age of the laptop, battery load-cycles, temperature and power usage. One additional feature that popped-out right away was the ability to save the maximum battery capacity and as so since August 12, 2010 to today I’ve recording these statistics with a fully charged battery to later analyze how my laptop’s battery health changed over time. That time has just ran out so let’s take a quick look over it!

First, data extraction. A config.xsl file was created with the following content:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
  <html>
  <body>
  <h2>My Apple MacBook Pro 13" (mid 2010) battery history</h2>
    <table border="1">
      <tr bgcolor="#9acd32">
        <th>Date</th>
        <th>Current Capacity</th>
      </tr>
      <xsl:for-each select="database/object[@type='SAVEDDATA']">
      <tr>
        <td><xsl:value-of select="attribute[@name='date']" /></td>
        <td><xsl:value-of select="attribute[@name='capacity']" /></td>
      </tr>
      </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>

Then, I fired up my terminal and ran:

$ xsltproc --nonet config.xsl ~/Library/Application\ Support/coconutBattery/coconutBattery.xml | sed 's|\(.*\)% (\(.*\) mAh)|\2|' > battery.html

This generated a battery.html file with 146 records dumped to a HTML table:

And here is a chart of it:

And finally a screenshot of my coconutBattery:

Battery load-cycles is at 58 after one year and one month and a half. Note that the age of my Mac that reads above is 15 months but the accurate age is 13 months (the former is time since manufactured).

Do you also log your battery health over time? Have these kind of data? Please share it with us!