How to isolate cause of iMac System Crash

The resolution to my problem was to replace the internal power supply. Apple performed the repair for $67 in parts and $79 in labor. The iMac has been rock solid since the repair was completed.


How would you go about determining exactly what's causing the crash?

Since you haven't found a way to bring on a crash at will, and the whole problem appears totally intermittent (i.e. it runs okay for weeks sometimes), it's somewhat harder to diagnose.

Normally you could go through a process of elimination to troubleshoot this, but that's not going to really work for if you haven't found a reliable way bring on a crash.

What you've done so far has been spot on, and doing a full fresh installation of macOS may be warranted, but before doing that there are some other things you could try. The most obvious one is to boot your iMac into Safe Mode as follows:

  1. Fully shut down your iMac
  2. Restart your iMac
  3. Immediately press the Shift key and keep it down
  4. Let go of the Shift key when you see the login window (NOTE: If you have FileVault enabled you may need to log in twice).

At this stage I would normally recommend testing to see if the problem still exists. In your case that's not going to be easy, so I would just use your iMac in Safe Mode for a while until you have a reason to reboot (e.g. not only features are available in Safe Mode, so you may need to reboot at some point anyway).

NOTE: Don't be concerned if it takes a while to boot into Safe Mode, as your Mac will delete a whole heap of caches, verify your boot volume, etc, and this takes time.

Is there a string I should be searching for in the logs that would give me this information or any software I can run to monitor the system health to capture this at crash-time?

The answer to this can differ depending on the version of macOS you're running (since macOS Sierra, the Console app is an entirely new beast).

For now, as a starting point, I suggest you download EtreCheck and run it (it's free and safe to use). It will produce a report of your system. Look over that and see if it finds anything of concern. If so, update your question to include anything that it flags as a potential problem and, while you're at it, also include your version of macOS and how much free space you have on your startup drive.