Saturday, July 14, 2018

macOS: know the previous shutdowns cause

centurion:~ jerome$ log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h

Filtering the log data using "eventMessage CONTAINS "Previous shutdown cause""
Skipping info and debug messages, pass --info and/or --debug to include.
Timestamp                       Thread     Type        Activity             PID    TTL  
2018-07-14 11:14:28.111106+0200 0xe5       Default     0x0                  0      0    kernel: (AppleSMC) Previous shutdown cause: 5
2018-07-14 11:32:41.196172+0200 0xe3       Default     0x0                  0      0    kernel: (AppleSMC) Previous shutdown cause: 5
 --------------------------------------------------------------------------------------------------------------------
Log      - Default:          2, Info:                0, Debug:             0, Error:          0, Fault:          0
Activity - Create:           0, Transition:          0, Actions:           0