Blog › macos, troubleshooting

How to See Your Mac's Charging History in Terminal

Published . Last updated .

macOS keeps a charging history on its own. Its power management service writes one log file per day to the /var/log/powermanagement folder, keeps about two weeks of them, and stamps each event with the power source (charger or battery) and the charge percentage. You can read it in Terminal without an administrator password. Every command below was tested on macOS Tahoe 26.7.1 on a 14-inch MacBook Pro with Apple silicon, and the output shown is real, with the charger’s serial number removed.

Which charger is connected right now, and how many watts is it giving?

pmset -g ac
 Wattage = 94W
 Current = 4690mA
 Voltage = 20000mV
 AdapterID = 28674
 Manufacturer = Apple Inc.
 Family Code = 0xe000400a
 Serial String = (removed)
 Adapter Name = 96W USB-C Power Adapter

Wattage is what the charger and the Mac agreed on through this particular cable, which can differ from the number printed on the charger. Apple’s 96W adapter negotiates 94W (20 volts at 4.69 amps), and that is normal. A figure far below the rating points at the cable, a dock, or a charger shared with another device; how to test a MacBook charger covers what to do next. Many third-party chargers report no name, manufacturer, or serial number, which is also normal.

For the battery side, pmset -g batt prints the current source and charge state, for example Now drawing from 'AC Power' and 100%; charged.

How do I see when the charger was connected and disconnected?

pmset -g log | grep -E "Using (AC|Batt|BATT)" | awk '{ src = ($0 ~ /Using AC/) ? "charger" : "battery"; if (src != last) { print $1, $2, "now on", src; last = src } }'

The raw log is long (tens of thousands of lines a week), so this command keeps only the lines that mention the power source and prints the moments it changed:

2026-10-12 09:18:43 now on charger
2026-10-12 09:19:13 now on battery
2026-10-12 09:46:37 now on charger
2026-10-12 11:02:18 now on battery
2026-10-12 11:02:26 now on charger
2026-10-12 11:59:16 now on battery

How to read it:

To see the charge percentage too, drop the awk part. Each matching line ends with the charge at that moment, for example Using AC(Charge: 42).

Why does pmset only show about a week?

Because pmset -g log prints less than macOS keeps. On our test Mac it went back 8 days, while /var/log/powermanagement held 15 daily files. An earlier test in August 2026 gave 7 days against 14. To reach the full two weeks, read the daily files directly with syslog -f:

for f in /var/log/powermanagement/*.asl; do syslog -f "$f" 2>/dev/null; done | grep -E "Using (AC|Batt|BATT)" | awk '{ src = ($0 ~ /Using AC/) ? "charger" : "battery"; if (src != last) { print $1, $2, $3, "now on", src; last = src } }'

This version sees only the activity summary lines, because pmset assembles its sleep and wake lines from data the raw files store in other fields. It is a little coarser and reaches twice as far back. On our Mac it found 84 power source changes across 15 days.

Does the log catch dropouts while the Mac is asleep?

Yes, and that is where it is most useful. A sleeping Apple silicon Mac wakes briefly every minute or two for maintenance, and each of those dark wakes records the power source. Plugging in during sleep triggers a wake of its own, logged with the reason USB-C_plug:

pmset -g log | grep "USB-C_plug"

Intel Macs keep the same log, but they sleep more deeply and wake less often, so overnight entries are further apart.

What can the log miss?

While you are using the Mac, an entry appears only when something happens: a wake, a sleep, or a periodic activity summary. A three-second cut in a quiet stretch of the afternoon can fall between two entries and never show up. To catch every cut you need something that listens as the power source changes. pmset -g pslog does that live in Terminal until you press Control-C, which makes it good for a wiggle test: run it, gently move the cable at each end, and watch for Now drawing from 'Battery Power'.

What else can Terminal show about charging?

system_profiler SPPowerDataType prints the same charger details that System Information shows (connected, wattage, name, whether it is charging) plus the battery’s health: cycle count, condition, and maximum capacity. On our test Mac that reads Cycle Count: 923, Condition: Normal, Maximum Capacity: 86%. A worn battery and a failing charger are separate problems, and this is the quickest way to tell them apart.

Is there an app that does this automatically?

Broken Charger reads this same folder after you grant read-only access once in the standard macOS file picker, so on its first day it can judge the past two weeks. From then on it listens to power events live from the menu bar, which catches the short cuts that fall between log entries, and it describes what it finds in plain sentences instead of log lines. It runs on macOS 12 and later, and nothing it reads leaves your Mac.

Frequently asked questions

Do I need sudo or an admin password? No. The daily files are readable by every user on the Mac (permissions -rw-r--r--), and every command here runs as a normal user.

Does this work on older versions of macOS? We tested on macOS Tahoe 26.7.1. pmset -g log and pmset -g ac have been part of macOS for many years, so expect them to work on older versions, though the exact output format can differ.

How much space does the power log use? A few megabytes a day. Our 15 daily files took about 36 MB in total, and macOS deletes the oldest files by itself.

Does the log show charger wattage over time? Not in the lines used here, which record the power source and charge percentage. For wattage, run pmset -g ac while the charger is connected, or use an app that shows it live.

macostroubleshooting

Let your Mac watch its own charging

Broken Charger is a menu bar app for MacBook (macOS 12.0 or later, Apple Silicon and Intel) that watches how reliably your Mac charges, catches power that comes and goes, and walks you through finding the broken part: wall socket, plug piece, cable, or charger. No subscription, no accounts, no ads, and no data collection; the app contains no network code at all.

Download on the Mac App Store