macos log command
- One minute read - 138 wordsMy work laptop has been randomly shutting itself off. I came across this stackoverflow post, it said to run
log show \
--predicate 'eventMessage contains "Previous shutdown cause"' \
--last 24h
which, for me, returns
risksys ➜ log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h
Filtering the log data using "composedMessage CONTAINS "Previous shutdown cause""
Skipping info and debug messages, pass --info and/or --debug to include.
Timestamp Thread Type Activity PID TTL
2019-05-23 11:29:01.874486-0700 0xaf Default 0x0 0 0 kernel: (AppleSMC) Previous shutdown cause: -128
2019-05-23 11:44:49.786722-0700 0xaf Default 0x0 0 0 kernel: (AppleSMC) Previous shutdown cause: -128
--------------------------------------------------------------------------------------------------------------------
Log - Default: 2, Info: 0, Debug: 0, Error: 0, Fault: 0
Activity - Create: 0, Transition: 0, Actions: 0
This, combined with these MacOS Shutdown Causes paints a pretty bleak picture: I’ve got RAM issues :-(