Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Extracting Cycle Count From System Report

I have an automator action set up to generate a Power System Report and create a text file based on it. Is there any way I can extract the Cycle Count from this?

OS X Yosemite (10.10.3)

Posted on Apr 28, 2016 6:43 AM

Reply
Question marked as Best reply

Posted on Apr 28, 2016 7:35 AM

From the Terminal:

$ system_profiler SPPowerDataType | awk '/Cycle Count/ {print $3}'

Return: 96 (on my 2014 MacBook Air)

8 replies

May 25, 2016 11:59 AM in response to techteej

Hi techteej, I think I'm trying to create roughly the same thing.


I'm using Automator, and the following;

[system_profiler SPPowerDataType | awk '/Cycle Count/ {print $3}']

returns;

567


I'm looking to add the date it was run, like a time/datestamp, to return a result like this;


567, dd/mm/yyyy


I'm not an expert in this area, so any help would be gratefully received.


Using OS X 10.11.4 (El Capitan)

May 26, 2016 1:33 PM in response to VikingOSX

Viking, Mark, thanks for your time on this. I've modified it slightly and it's just the job.

temp=$(system_profiler SPPowerDataType | awk '/Cycle Count/ {print $3}')","; echo "$temp$(date "+%d/%m/%Y")"

and it returned

592,26/05/2016

I now run this daily using a scheduled 'Automator' job and it writes to a log. I can then see how quickly I'm approaching my 1000 cycles for a MacBook Pro.

Extracting Cycle Count From System Report

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.