I was working, then I received a phone call and left my iMac for a while. macOS Sierra is actually running.
I came back about 30 minutes later and found my Mac was turned off.
Since there are no phantoms at home, I thought I forgot I turned it off, maybe absentmindedly (I'm quite sure I didn't, anyway).
The question is: is there any way to check HOW the iMac turned off? (crash, eletricity grid issue, manual, etc.)
I read the console data but I don't know exactly what to search for (apparently there's no crash).
Update: The last thing I see in system.log:
Jan 4 10:33:53 M-iMac com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.IDECacheDeleteAppExtension.2237): Path not allowed in target domain: type = pid, path = /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/XPCServices/RootDebuggingXPCService.xpc error = 147: The specified service did not ship in the requestor's bundle, origin = /Applications/Xcode.app/Contents/PlugIns/IDECacheDeleteAppExtension.appex
Jan 4 10:33:54 M-iMac com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.IDECacheDeleteAppExtension.2237): Path not allowed in target domain: type = pid, path = /Applications/Xcode.app/Contents/Frameworks/DFRSupportKit.framework/Versions/A/XPCServices/IDETouchBarSimulatorService.xpc error = 147: The specified service did not ship in the requestor's bundle, origin = /Applications/Xcode.app/Contents/PlugIns/IDECacheDeleteAppExtension.appex
Jan 4 10:33:54 M-iMac com.apple.xpc.launchd[1] (com.apple.nowplayingtouchui): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Here I'm restarting (I suppose):
Jan 4 11:03:51 localhost bootlog[0]: BOOT_TIME 1483524231 0
syslog | grep -i "shutdown cause"
and post the results to your question. – Allan Jan 4 '17 at 11:22