Log windows shutdown events

Описание отслеживания событий завершения работы

В этой статье описывается отслеживание событий завершения работы.

Исходная версия продукта: Windows 10 — все выпуски, Windows Server 2012 R2
Исходный номер КБ: 293814

Аннотация

Отслеживание событий завершения работы — это функция Microsoft Windows Server 2003 и Microsoft Windows XP, которую можно использовать для согласованного отслеживания причины отключения системы. Затем эти сведения можно использовать для анализа завершения работы и разработки более полного понимания системной среды. Отслеживание событий завершения работы занося в журнал событий, аналогичных следующим событиям системы:

Дополнительные сведения

Windows Server 2003 и Windows XP 64-Bit Edition версии 2003

По умолчанию отслеживание событий завершения работы включено для всех операционных систем Windows Server 2003 и Windows XP 64-Bit Edition версии 2003.

Чтобы отключить отслеживание событий завершения работы во всех операционных системах Windows Server 2003 и Windows XP 64-Bit Edition версии 2003, отключать политику отслеживания событий завершения работы с помощью групповой политики. Чтобы сделать это с помощью локальной групповой политики, выполните следующие действия:

  1. Нажмите кнопку Пуск и выберите пункт Выполнить.
  2. Введите gpedit.msc и выберите «ОК».
  3. Раз развернуть конфигурацию компьютера, развернуть административные шаблоны, а затем развернуть «Система».
  4. Дважды щелкните display Shutdown Event Tracker.
  5. Выберите «Отключено» и «ОК»

Windows XP Professional

По умолчанию в Windows XP Professional отключено отслеживание событий завершения работы.

Чтобы включить отслеживание событий завершения работы в Windows XP Professional, Windows XP Tablet PC Edition и Windows XP Media Center Edition, включите политику отслеживания событий завершения работы с помощью групповой политики. Чтобы сделать это с помощью локальной групповой политики, выполните следующие действия:

  1. Нажмите кнопку Пуск и выберите пункт Выполнить.
  2. Введите gpedit.msc и выберите «ОК».
  3. Раз развернуть конфигурацию компьютера, развернуть административные шаблоны, а затем развернуть «Система».
  4. Дважды щелкните display Shutdown Event Tracker.
  5. Щелкните Включено.
  6. В окне «Отслеживание событий завершения работы» выберите «Всегда» и выберите «ОК».

Отслеживание событий завершения работы не является функциональным компонентом в Windows XP Home Edition. Поэтому вы не можете использовать отслеживание событий завершения работы в Windows XP Home Edition.

Корпорация Майкрософт рекомендует не включить отслеживание событий завершения работы в Windows XP Professional, планшетном ПК с Windows XP или Windows XP Media Center Edition. Корпорация Майкрософт не поддерживает использование этого компонента в этих средах Windows XP.

Настраиваемые параметры для определения причины завершения работы

В этот раздел, описание метода или задачи включены действия, содержащие указания по изменению параметров реестра. Однако неправильное изменение параметров реестра может привести к возникновению серьезных проблем. Поэтому следует в точности выполнять приведенные инструкции. Для дополнительной защиты создайте резервную копию реестра, прежде чем редактировать его. Так вы сможете восстановить реестр, если возникнет проблема. Дополнительные сведения см. в сведениях о том, как создать и восстановить реестр в Windows.

Windows предоставляет список из восьми универсальных причин, по которым компьютер был отключен. Этот список можно изменить, включив в него собственные настраиваемые причины. Чтобы добавить собственные причины, выполните следующие действия:

Откройте редактор реестра.

Найдите и выберите следующий ключ реестра: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Reliability\UserDefined

В меню «Правка» выберите «Новый» и «Много строка». При этом создается новый ключ с временным именем «New Value».

Читайте также:  Если отсутствует или поврежден пакет windows script

Введите имя ключа реестра в следующем формате и нажмите клавишу ВВОД: UI_control_flags; major_reason_number; minor_reason_number
Раздел UI_control_flags имени значения может содержать одно или несколько из следующих значений:

  • P (указывает, что причина запланирована. Если это значение опущено, значение по умолчанию является незапланированным.)
  • C или B (указывает, что требуется комментарий).)
  • S (указывает, что причина должна отображаться в диалоговом окне завершения работы, инициированном пользователем.)
  • Г (указывает, что причина должна отображаться в диалоговом окне неожиданного завершения работы.) Например, если вы хотите, чтобы причина отображалась в диалоговом окне неожиданного завершения работы, завершение работы будет незапланированным, а завершение работы соответствует основной причине 2 и по второстепенной причине 2, введите следующее имя значения: D;2;2

Дважды щелкните новый ключ и определите данные значения в следующем формате:

Каждое значение состоит из двух строк на отдельных строках; Первая строка является заголовком (она отображается в списке), а вторая строка — описанием (это текст, который отображается по выбранной причине).

Например, если вы хотите создать настраиваемую причину аварии, можно определить данные значения следующим образом: Natural Disaster (unplanned)

Чтобы компьютер был выключен, необходимо, чтобы компьютер был остановлен из-за затравки, а также от хлама или другого незапланированного естественного события. Укажите естественное событие в области комментария.

Description of the Shutdown Event Tracker

This article describes the Shutdown Event Tracker.

Original product version: В Windows 10 — all editions, Windows Server 2012 R2
Original KB number: В 293814

Summary

Shutdown Event Tracker is a Microsoft Windows Server 2003 and Microsoft Windows XP feature that you can use to consistently track the reason for system shutdowns. You can then use this information to analyze shutdowns and to develop a more comprehensive understanding of your system environment. Shutdown Event Tracker logs events that are similar to the following in the system event log:

More information

Windows Server 2003 and Windows XP 64-Bit Edition Version 2003

By default, Shutdown Event Tracker is enabled for all Windows Server 2003 operating systems and for Windows XP 64-Bit Edition Version 2003.

To disable Shutdown Event Tracker on all Windows Server 2003 operating systems and in Windows XP 64-Bit Edition Version 2003, disable the Display Shutdown Event Tracker policy by using Group Policy. To do it by using Local Group Policy, follow these steps:

  1. Select Start, and then select Run.
  2. Type gpedit.msc, and then select OK.
  3. Expand Computer Configuration, expand Administrative Templates, and then expand System.
  4. Double-click Display Shutdown Event Tracker.
  5. Select Disabled, and then select OK.

Windows XP Professional

By default, Shutdown Event Tracker is disabled in Windows XP Professional.

To enable Shutdown Event Tracker in Windows XP Professional, in Windows XP Tablet PC Edition, and in Windows XP Media Center Edition, enable the Display Shutdown Event Tracker policy by using Group Policy. To do it by using Local Group Policy, follow these steps:

  1. Select Start, and then select Run.
  2. Type gpedit.msc, and then select OK.
  3. Expand Computer Configuration, expand Administrative Templates, and then expand System.
  4. Double-click Display Shutdown Event Tracker.
  5. Select Enabled.
  6. In the Shutdown Event Tracker should be displayed box, select Always, and then select OK.

Shutdown Event Tracker isn’t a functional component in Windows XP Home Edition. So you can’t use Shutdown Event Tracker in Windows XP Home Edition.

Microsoft recommends that you don’t enable the Shutdown Event Tracker in Windows XP Professional, Windows XP Tablet PC, or Windows XP Media Center Editions. Microsoft doesn’t support the use of this component in these Windows XP environments.

Читайте также:  Mac os откат обновления

Custom Options for identifying a shutdown cause

This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information, see How to back up and restore the registry in Windows.

Windows provides a list of eight generic reasons why your computer was shut down. You can modify this list to include your own custom reasons. To add your own reasons, follow these steps:

Start Registry Editor.

Locate and then select the following registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Reliability\UserDefined

On the Edit menu, select New, and then select Multi-String Value. Which creates the new key and gives it the temporary name «New Value.»

Type the name of the registry key in the following format, and then press ENTER: UI_control_flags; major_reason_number; minor_reason_number
The UI_control_flags section of the value name can contain one or more of the following values:

  • P (Indicates that the reason is planned. If this value is omitted, the default is unplanned.)
  • C or B (Indicates that a comment is required.)
  • S (Indicates that the reason should be displayed in the user-initiated shutdown dialog box.)
  • D (Indicates that the reason should be displayed in the sudden shutdown dialog box.)For example, if you want a reason to be displayed in the sudden shutdown dialog box, the shutdown is unplanned, and the shutdown corresponds to a major reason 2 and to a minor reason 2, type the following value name: D;2;2

Double-click the new key, and then define the value data in the following format:

Each value is made up of two strings on separate lines; the first string is the title (it’s displayed in the list) and the second string is the description (it’s the text that is displayed following the selected reason).

For example, if you want to create a custom reason for a natural disaster, you can define the value data as follows: Natural Disaster (unplanned)

A flood, an earthquake, a tornado, or another unplanned natural event requires that the computer shuts down. Specify the natural event in the comment area.

Windows: Shutdown/Reboot Event IDs – Get Logs

While troubleshooting an issue that causes an unexpected reboot or shutdown of a Windows machine, it is important to know which event IDs are related to system reboot/shutdown and how to find the appropriate logs.

In this note i am publishing all the event IDs related to reboots/shutdowns.

I am also showing how to display the shutdown events with date and time, using a Windows Event Viewer or from the command-line using a PowerShell.

Cool Tip: How to boot Windows in Safe Mode! Read more →

Shutdown Event IDs

The list of the Windows event IDs, related to the system shutdown/reboot:

Event ID Description
41 The system has rebooted without cleanly shutting down first.
1074 The system has been shutdown properly by a user or process.
1076 Follows after Event ID 6008 and means that the first user with shutdown privileges logged on to the server after an unexpected restart or shutdown and specified the cause.
6005 The Event Log service was started. Indicates the system startup.
6006 The Event Log service was stopped. Indicates the proper system shutdown.
6008 The previous system shutdown was unexpected.
6009 The operating system version detected at the system startup.
6013 The system uptime in seconds.
Читайте также:  Windows idimm edition usb

Display Shutdown Logs in Event Viewer

The shutdown events with date and time can be shown using the Windows Event Viewer.

Start the Event Viewer and search for events related to the system shutdowns:

  1. Press the Win keybutton, search for the eventvwr and start the Event Viewer
  2. Expand Windows Logs on the left panel and go to System
  3. Right-click on System and select Filter Current Log.
  4. Type the following IDs in the field and click OK :

Cool Tip: Get history of previously executed commands in PowerShell! Read more →

Find Shutdown Logs using PowerShell

For example, to filter the 10000 most recent entries in the System Event Log and display only events related to the Windows shutdowns, run:

Cool Tip: Start/Stop a service in Windows from the CMD & PowerShell! Read more →

How to Find the Shutdown Log in Windows 10

If you are curious to know why your computer shut down and what happened exactly during the shut down, you will be happy to know that Windows is able to track the shut down process and write a number of events in the system log. In this article, we will see how to find them.

In Windows 10, there are three events connected with shut down and restart.

Event ID 1074 — Indicates that the shut down process was initiated by an app. For example, it can be Windows Update.

Event ID 6006 — The clean shut down event. This means Windows 10 was turned off correctly.

Event ID 6008 — Indicates a dirty/improper shutdown. Appears in the log when the previous shutdown was unexpected, e.g. due to power loss or BSoD (Bug check).

Here is how to find these events.

To find the Shutdown log in Windows 10, do the following.

  1. Press the Win + R keys together on the keyboard to open the Run dialog, type eventvwr.msc, and press the Enter key.
  2. In Event Viewer, select Windows Logs -> System on the left.
  3. On the right, click on the link Filter Current Log.
  4. In the next dialog, type the line 1074, 6006, 6008 into the text box under Includes/Excludes Event IDs.
  5. Click OK to filter the event log.

Now, the Event Viewer will display only events related to shut down.

Note: Starting with Windows 10 Fall Creators Update, the operating system is able to automatically reopen apps which were running before shutdown or restart. This behavior is totally unexpected for most Windows users who upgraded to the recent release of the OS. To avoid this issue, you can add a special «Shut Down» context menu to the Desktop that restores the classic behavior.

See the following article:

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

Share this post

About Sergey Tkachenko

Sergey Tkachenko is a software developer from Russia who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

2 thoughts on “ How to Find the Shutdown Log in Windows 10 ”

Thank you, it worked.

Thanks for simple explanation. It worked.

Leave a Reply Cancel reply

Connect with us

We discontinued Facebook to deliver our post updates.

Оцените статью