1

If a MacBook Pro (16-inch, 2019) has its charger plugged in and the mains power goes off and back on, is that recorded in any log? Maybe something monitoring that USB port? (Nothing in console has "usb" in the title.)

And if so, does it work when the lid is closed (presumably sleeping)?

1 Answer 1

1

If a MacBook Pro (16-inch, 2019) has its charger plugged in and the mains power goes off and back on, is that recorded in any log?

Located in /private/var/log/powermanagement/ there are, e.g., 2021.09.17.asl files that will contain entries, e.g.,:

15:57:00.586812-0400    powerd  Summary- [System: PrevIdle DeclUser kDisp] Using Batt(Charge: 100)

As well as, e.g.,:

15:59:18.910800-0400    powerd  Summary- [System: PrevIdle DeclUser kDisp] Using AC(Charge: 100)

Which in my case shows when I last switched from battery to AC power yesterday when I was testing something I needed to be on battery power for.

Note that these logs were viewable in Console when I double-clicked them in Finder.

Notes:

As these files are binary and one could grep 'Using Batt' on them, while it would return e.g. Binary file 2021.09.17.asl matches, nonetheless, one can use syslog instead of Console, e.g.:

syslog -d /private/var/log/powermanagement/ | grep 'Using Batt'

To get output, e.g.:

Sep 17 15:57:00 [edit]-MacBook-Pro powerd[111] <Notice>: Summary- [System: PrevIdle DeclUser kDisp] Using Batt(Charge: 100)

I too am using a MacBook Pro (16-inch, 2019).

5
  • I don’t recall seeing “power” in console, either. But I’ll look again.
    – WGroleau
    Sep 18, 2021 at 14:50
  • @WGroleau, RE: "I don’t recall seeing “power” in console, either." -- Please reread my answer as I stated "Note that these logs were viewable in Console when I double-clicked them in Finder." Sep 18, 2021 at 14:51
  • Ah, sō desu ka …
    – WGroleau
    Sep 18, 2021 at 15:17
  • @WGroleau, Hai,-sōdesu Sep 18, 2021 at 15:22
  • Also "Using AC." the two together tells me what I was after, which was how long the mains were out. Only fifteen seconds. And it DID log with the lid closed..
    – WGroleau
    Sep 18, 2021 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .