Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

madeirabhoy

macrumors 68000
Original poster
Oct 26, 2012
1,673
622
strange question I know..

intermittent problem with electricity, a trip switch keeps going off in flat. doesn't happen for weeks then happens 3 days in a row. trying to figure out problem with electrician. its not the main trip switch, or an individual circuit but instead a tripswitch that is on top of all the socket circuits. its random, and have pretty much ruled out every device in the flat so very confused.


in the meantime, when I come home and its off, id like to know what time it went off, it might help with diagnosing the problem plus it helps with my paranoia of how long fridge was off.

often 'find my' gives me an idea, but it went off overnight and 'find my' is listing my Mac as having been seen last week, so thats not reliable.

is there any log on the Mac that shows what time it shut down? or any app that could be left in the background that would show it in some way?
 

Ruggy

macrumors 65816
Jan 11, 2017
1,024
665
Electric clock? Bedside alarm clock? As long as it's analogue, will switch off when the electricity goes off and show you the time afterwards.
Had a problem like that on a cooker. It turned out to be some insulation inside the cooker. It was just a bit badly installed and being glass fibre on aluminium foil every so often a bit of vibration would cause it to touch metal and short circuit. Fortunately, I worked out it was the cooker and then the rest was observation
Another problem I've had is just simply overloading the circuit. If you have all electric heating and a cold snap, all of them are working then if you have the hot water come on and a couple of things like a washing machine and a tumble drier, that's enough.
Most probably neither of those things but it's exactly the sort of thing that happens randomly and very difficult to trace so good luck.
 
  • Like
Reactions: madeirabhoy

madeirabhoy

macrumors 68000
Original poster
Oct 26, 2012
1,673
622
Electric clock? Bedside alarm clock? As long as it's analogue, will switch off when the electricity goes off and show you the time afterwards.
Had a problem like that on a cooker. It turned out to be some insulation inside the cooker. It was just a bit badly installed and being glass fibre on aluminium foil every so often a bit of vibration would cause it to touch metal and short circuit. Fortunately, I worked out it was the cooker and then the rest was observation
Another problem I've had is just simply overloading the circuit. If you have all electric heating and a cold snap, all of them are working then if you have the hot water come on and a couple of things like a washing machine and a tumble drier, that's enough.
Most probably neither of those things but it's exactly the sort of thing that happens randomly and very difficult to trace so good luck.


thanks, now where to find an analogue clock lol
 

glenthompson

macrumors demi-god
Apr 27, 2011
2,983
844
Virginia
Plug it into a UPS that communicates with the iMac. It will log all the outages. I’ve setup something similar to alert me that our power has gone off and the backup generator is starting.
 

madeirabhoy

macrumors 68000
Original poster
Oct 26, 2012
1,673
622
Use the following line in Terminal.app

Code:
log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h
You should see a result like the following:

Timestamp Thread Type Activity PID TTL
2021-03-27 17:41:19.924819-0600 0xb1 Default 0x0 0 0 kernel: (AppleSMC) Previous shutdown cause: 5

Mac shutdown and sleep cause codes

thanks thats exactly what I need
 
  • Like
Reactions: mrgraff

madeirabhoy

macrumors 68000
Original poster
Oct 26, 2012
1,673
622
Use the following line in Terminal.app

Code:
log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h
You should see a result like the following:

Timestamp Thread Type Activity PID TTL
2021-03-27 17:41:19.924819-0600 0xb1 Default 0x0 0 0 kernel: (AppleSMC) Previous shutdown cause: 5

Mac shutdown and sleep cause codes


just realised that despite its name, it doesn't show the time of shutdown, it shows the time of restart.
 

Allyance

Contributor
Sep 29, 2017
2,075
7,688
East Bay, CA
Go to a thrift store, there should be plenty of old analog electric clocks. Just subtract the time shown (if it is running again) from the real time, then you can figure out when and how long it was off.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.