Is there some standard way to test the mac air battery life?

Discussion in 'MacBook Air' started by nariza7, Jul 13, 2013.

  1. nariza7 macrumors member

    Jun 16, 2013
    I was wondering if there was such a program that could be left on to run the mac air from 100% to let's say 5% and measure the time it took for that to happen. Then for there to be an accepted length of time to verify that the battery life is normal in the sense that on average, the battery life lasts around this time given the same situation.

    For instance, apple said the mac air 11 inch can go for 7-9 hours on a charge. Is there some program or means to replicate their test and see if the battery of the mac air is functioning correctly?
  2. FreakinEurekan macrumors 68040


    Sep 8, 2011
    Eureka Springs, Arkansas
    Nothing terribly consistent in the manner you're describing. There are too many variables - screen brightness, background tasks, etc.

    You can see the current charged capacity in System Report, and the rated capacity is listed there as well. That's a means to monitor the general health of the battery over time. This article discusses cycle count specifically, but the "Charge Remaining" and "Full Charge Capacity" are on the same screen as cycle count:
  3. rmastbro macrumors member

    Jun 14, 2009
    Apple script to check battery life with output file

    Here's an apple script that I wrote (also attached as a zip) that opens up a website switches after 30 seconds and opens another. After the 2nd 30 seconds it records a timestamp and battery level to a file on desktop and then reopens the 1st tab and repeats.

    You can change these links to any webpage like youtube if you wanted to stream video.


    -- Insert any URL as desired
    open location ""
    delay 30
    open location ""
    -- Set any delay to a desired value. Every 60 seconds the file Uptime log.txt will be updated
    delay 30

    set thePath to (path to desktop as Unicode text) & "Uptime log.txt"

    set fRef to (open for access file thePath with write permission)
    set myDate to date string of (current date)
    set myTime to time string of (current date)
    set myWords to myTime & " " & myDate
    write myWords to fRef starting at eof

    set maxCapacity to do shell script "ioreg -w0 -l | grep \"\\\"MaxCapacity\\\" =\""
    set maxLevel to the last word of maxCapacity
    set curCapacity to do shell script "ioreg -w0 -l | grep \"\\\"CurrentCapacity\\\" = \""
    set curLevel to the last word of curCapacity
    set battPct to round (100 * curLevel / maxLevel)
    set output to " : Battery " & battPct & "%"
    write output & return to fRef starting at eof

    end try
    close access fRef

    end repeat

    Attached Files:

Share This Page