Skip to content

Instantly share code, notes, and snippets.

@utsengar
Created May 5, 2015 04:17
Show Gist options
  • Save utsengar/bfdb5f0f53346e0a39ba to your computer and use it in GitHub Desktop.
Save utsengar/bfdb5f0f53346e0a39ba to your computer and use it in GitHub Desktop.
Check Battery health for a Mac (result in %, should be 100% for a brand new mac)
echo $(ioreg -l -n AppleSmartBattery -r | grep MaxCapacity | awk '{print $3}') / $(ioreg -l -n AppleSmartBattery -r | grep DesignCapacity | awk '{print $3}') \* 100 | bc -l
@utsengar
Copy link
Author

utsengar commented May 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment