Ir para o conteúdo principal
How to determine Mac shutdown causes

How to determine Mac shutdown causes

Jonah Aragon

Jonah Aragon e 4 outros colaboradores

Última atualização em December 29, 2023

2 minutos
Muito fácil
Guia colaborativo

Introdução

Ir para o passo 1

This guide will show you how to determine why exactly your Mac shut down or restarted using macOS's built-in logging.

  1. How to determine Mac shutdown causes, Open Terminal.app: passo 1, imagem 1 %32
    • Open Terminal.app

  2. How to determine Mac shutdown causes, Listing previous shutdowns: passo 2, imagem 1 %32
    • Copy and paste the following command in your Terminal window:

    • log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h

    • The "24h" portion of the command can be changed to any number of hours, depending on how far back you need to see.

  3. How to determine Mac shutdown causes, Determining Shutdown Causes: passo 3, imagem 1 %32
    • The previous shutdown causes in the timeframe you selected will appear as a list.

    • Common shutdown causes include 5 which indicates a normal shutdown, 3 which indicates a hard shutdown (i.e. holding the power button), and 0 which indicates the power was disconnected.

    • A list of shutdown causes can be found here: Shutdown causes (from George Garside blog)

Conclusão

Done! You should be able to use these codes to further troubleshoot random shutdowns or other strange events.

Hit the button below if this guide helped solve your issue :)

24 outras pessoas executaram este guia.

Documentos anexados

Jonah Aragon

Membro desde: 08/05/18

5.585 Reputação

Autoria de 5 guias

Equipe

Experimax Coon Rapids Membro de Experimax Coon Rapids

Business

3 Membros

Autoria de 17 guias

14Comentários do guia

For me it says

kernel: (AppleSMC) Previous shutdown cause: -20

The attached PDF (and the internet) doesn’t seem to have any information about this code. What’s the source of the codes for the PDF? Maybe they have updated listing for shutdown codes.

Saurabh Shrivastava - Responder

we also have -20 as a cause and have no idea what it means. did you ever find it out?

octomobiki -

I also have -20 code of shut down after macOS 10.15.5 update with MBP 16inches model.

but no information at all….

赤月小黄泉 -

writErr = -20, /*I/O System Errors*/ its this error for code -20 .. Find all error codes here :- https://krypted.com/lists/comprehensive-...

UNKNOWN X -

Sorry , that was not related, check this one : - https://georgegarside.com/blog/macos/shu...

and, error code 20- T2 security chip initiated shutdown

UNKNOWN X -

Comentar

Visualizações:

Últimas 24 horas: 36

Últimos 7 dias: 181

Últimos 30 dias: 658

Ao todo: 99,795