990x.top
Простой компьютерный блог для души)
Windows Log files что это?
Всем привет. Сегодня мы поговорим на тему лог-файлов, а вернее о том что такое Windows Log files. Значит сперва немного общей информации так бы сказать. Что такое лог-файлы? Это такие файлы, куда программа записывает свои действия — что у нее получилось сделать, а что нет, где произошла ошибка.. То есть можно сказать что лог-файл это типа отчета. Если вдруг случилась ошибка, то при помощи лог-файла можно попробовать понять где именно она появилась.
Но что такое Windows Log files? Ну логично что это лог-файлы винды. Может вы где-то нашли папку с названием Windows Log files? Если это папка, то удалять.. в принципе можно, но я думаю что не стоит.
Сами по себе лог-файлы безобидны. Представляют из себя текстовые документы с расширением log. Внутри такого файла может быть просто текст какой-то, а может будут строчки, каждая из которых начинается на дату, время, ну а потом идет описание события.
Название Windows Log files может быть где угодно. Например это может быть папка, как я уже писал, а может быть еще пункт в проге по очистке системы, там может быть где-то галочка Windows Log files. И если эту галочку отметить, то будут в теории удалены лог-файлы.
То есть лог-файлы в принципе это не очень там уж критически важные файлы. И если комп работает исправно то их можно удалить. Но может быть такое, что будет ошибка при удалении какого-то лог-файла, типа он занят. Да, такое может быть, если в данный момент лог-файл открыт для записи, и прога пишет туда отчет о том что она делает.
Также забыл сказать, что вообще лог-файлы могут быть как у системы так и у любой программы, если в ней это заложено. Мне кажется что лог-файлы только для этого и придуманы — анализ работы программы, выявление ошибок. Другого на ум ничего не приходит
Вот давайте для примера я вам покажу лог-файлы. Самые обычные — они есть в каждой винде, я их даже искать не буду, я просто открою папку Windows. Итак, смотрите, зажимаем кнопки Win + R, потом пишем в окошку команду:
Нажали ОК и потом откроется самая важная и самая системная папка Windows, в ней сразу нажимаем на колонку Тип, чтобы отсортировать файлы по типам:
После этого все файлы с расширением log будут рядышком, стоит немного мышкой покрутить и вот они, у меня их тут всего четыре штуки, что-то даже как-то маловато:
Вот видите тут есть WindowsUpdate.log? Это лог-файл обновления винды, то есть в этом файле идет отчет об обновлениях, все ли там нормально, это просто пример, но я файл открыл и вот что внутри:
Вот здесь все как обычно — сначала идет дата, потом время, потом еще что-то.. даже не знаю что.. а потом идет описание события. Для примера я открыл еще файл setupact.log, здесь вот уже нет времени, даты, тут просто указана какая-то инфа:
Но все равно, традиционно лог-файл должен идти с датой и временем вначале каждой строки.
Так, а давайте поищем лог-файлы? Ну вообще посмотрим сколько их, в каких папках.. ребята, зажимаем Win + E, появится окно проводника, вы туда, а вернее в правом верхнем углу есть текстовое поле поиска, вот туда вставляете это:
Вот я только вставил и файлы уже появились, как видите, размер их невелик, поэтому они.. ну вряд ли могут реально много занимать места на диске. Хотя я вот тут подумал.. а если в проге какой-то глюк случился.. и она постоянно пишет и пишет в лог-файл.. и сам файл то удалить нельзя, он ведь занят.. а она пишет и пишет.. ну это я нафантазировал конечно, но думаю что и такое в жизни может быть. Так, в итоге у меня нашлось всего 219 лог-файлов, я честно говоря думал что будет больше:
Но видите там есть еще файлы с расширением LOG1? Я думаю что это не лог-файлы, то есть не отчеты, их даже открыть нельзя, типа нет проги которой можно открыть, выскакивает такое окошко:
Но я сделал вот что.. я выбрал второй пункт и там попробовал открыть при помощи блокнота, но увы, была ошибка и я кстати о ней писал, что такое может быть:
Ибо файл открыт системой для записи, а значит файл занят Но я попробовал другой. Это мы с вами пробовали открыть SYSTEM.LOG1, а я вот нашел другой файл COMPONENTS.LOG1 и его открыть я смог, но содержимое все равно непонятное:
Может это и лог файл, но как видим он идет в другой кодировке. Короче ладно.
Так, вернемся к Windows Log files.. а то я что-то прям очень увлекся лог-файлами. Я решил поискать картинки в интернете на тему Windows Log files, может что-то интересное найду.. вообще мало что есть интересного, но я нашел такую картинку, это чистилка CCleaner и тут как раз упоминается Windows Log files:
То есть на картинке мы видим что CCleaner может чистить комп от лог-файлов Windows Вот еще одна прога, тоже какая-то чистилка, но мне она незнакома, называется Sweepi и тут тоже есть пункт Windows Log files:
Видите, там еще есть Temporary Internet Files — это временные файлы интернета. Вообще везде где видите слово Temp, это все типа временное, поэтому его можно как бэ удалить типа для ускорения системы.
На всякий случай, мало что, я не знаю что там у вас — папка с названием Windows Log files или программа такая, или что-то еще.. Но перед любыми изменениями в винде я рекомендую создавать точку восстановления. И это не требует особых знаний. Вам нужно всего лишь зажать Win + R, вставить туда:
Потом там нужно выбрать системный диск и нажать кнопку Создать (но если нужно наоборот — то есть кнопка выше Восстановление):
Название точки советую задавать простое, например Удаление папки Windows Log files:
Процесс создания будет недолгим:
И все, потом будет написано что успешно:
И все — теперь можете проводить какие-то действия и не бояться, ибо если что, есть точка восстановления! Конечно я не имею ввиду что можно например удалять загрузочные файлы.. нет, все в рамках приличия.
На этом все друзья, надеюсь представленная информация для кого-то все таки оказалась полезной. Удачи вам и суперского настроения!
How to See PC Startup And Shutdown History in Windows 10
There are times when a user wants to know the startup and shutdown history of a computer. Mostly, system administrators need to know about the history for troubleshooting purposes. If multiple people use the computer, it may be a good security measure to check PC startup and shutdown times to make sure the PC is being used legitimately. In this article we will discuss two ways to keep track of your PC shutdown and startup times.
Using event logs to extract startup and shutdown times
Windows Event Viewer is a wonderful tool which saves all kinds of stuff that is happening in the computer. During each event, the event viewer logs an entry. The event viewer is handled by eventlog service that cannot be stopped or disabled manually, as it is a Windows core service. The event viewer also logs the start and stop times of the eventlog service. We can make use of those times to get an idea of when our computer was started or shut down.
The eventlog service events are logged with two event codes. The event ID 6005 indicates that the eventlog service was started, and the event ID 6009 indicates that the eventlog services were stopped. Let’s go through the complete process of extracting this information from the event viewer.
1. Open Event Viewer (press Win + R and type eventvwr ).
2. In the left pane, open Windows Logs -> System.
3. In the middle pane you will get a list of events that occurred while Windows was running. Our concern is to see only three events. Let’s first sort the event log with Event ID. Click on the Event ID label to sort the data with respect to the Event ID column.
4. If your event log is huge, then the sorting will not work. You can also create a filter from the actions pane on the right side. Just click on “Filter current log.”
5. Type 6005, 6006 in the Event IDs field labeled as . You can also specify the time period under Logged.
- Event ID 6005 will be labeled as “The event log service was started.” This is synonymous with system startup.
- Event ID 6006 will be labeled as “The event log service was stopped.” This is synonymous with system shutdown.
If you want to investigate the Event log further, you can go through the Event ID 6013 which will display the uptime of the computer, and Event ID 6009 indicates the processor information detected during boot time. Event ID 6008 will let you know that the system started after it was not shut down properly.
Using TurnedOnTimesView
TurnedOnTimesView is a simple, portable tool for analyzing the event log for startup and shutdown times. The utility can be used to view the list of shutdown and startup times of local computers or any remote computer connected to the network. Since it is a portable tool, you will only need to unzip and execute the TurnedOnTimesView.exe file. It will immediately list the startup time, shutdown time, duration of uptime between each startup and shutdown, shutdown reason and shutdown code.
Shutdown reason is usually associated with Windows Server machines where we have to give a reason if we are shutting down the server.
To view the startup and shutdown times of a remote computer, go to “Options -> Advanced Options” and select “Data source as Remote Computer.” Specify the IP address or name of the computer in the Computer Name field and Press the OK button. Now the list will show the details of the remote computer.
While you can always use the event viewer for detailed analysis of startup and shutdown times, TurnedOnTimesView serves the purpose with a very simple interface and to-the-point data. For what purpose do you monitor the startup and shutdown times of your computer? Which method do you prefer for monitoring?
Content Manager at Make Tech Easier. Enjoys Android, Windows, and tinkering with retro console emulation to breaking point.
Log files
Applies to
This is a 400 level topic (advanced).
See Resolve Windows 10 upgrade errors for a full list of topics in this article.
Several log files are created during each phase of the upgrade process. These log files are essential for troubleshooting upgrade problems. By default, the folders that contain these log files are hidden on the upgrade target computer. To view the log files, configure Windows Explorer to view hidden items, or use a tool to automatically gather these logs. The most useful log is setupact.log. The log files are located in a different folder depending on the Windows Setup phase. Recall that you can determine the phase from the extend code.
Also see the Windows Error Reporting section in this document for help locating error codes and log files.
The following table describes some log files and how to use them for troubleshooting purposes:
Log file | Phase: Location | Description | When to use |
setupact.log | Down-Level: $Windows. BT\Sources\Panther | Contains information about setup actions during the downlevel phase. | All down-level failures and starting point for rollback investigations. This is the most important log for diagnosing setup issues. |
OOBE: $Windows. BT\Sources\Panther\UnattendGC | Contains information about actions during the OOBE phase. | Investigating rollbacks that failed during OOBE phase and operations – 0x4001C, 0x4001D, 0x4001E, 0x4001F. | |
Rollback: $Windows. BT\Sources\Rollback | Contains information about actions during rollback. | Investigating generic rollbacks — 0xC1900101. | |
Pre-initialization (prior to downlevel): Windows | Contains information about initializing setup. | If setup fails to launch. | |
Post-upgrade (after OOBE): Windows\Panther | Contains information about setup actions during the installation. | Investigate post-upgrade related issues. | |
setuperr.log | Same as setupact.log | Contains information about setup errors during the installation. | Review all errors encountered during the installation phase. |
miglog.xml | Post-upgrade (after OOBE): Windows\Panther | Contains information about what was migrated during the installation. | Identify post upgrade data migration issues. |
BlueBox.log | Down-Level: Windows\Logs\Mosetup | Contains information communication between setup.exe and Windows Update. | Use during WSUS and WU down-level failures or for 0xC1900107. |
Supplemental rollback logs: Setupmem.dmp setupapi.dev.log Event logs (*.evtx) | $Windows. BT\Sources\Rollback | Additional logs collected during rollback. | Setupmem.dmp: If OS bug checks during upgrade, setup will attempt to extract a mini-dump. Setupapi: Device install issues — 0x30018 Event logs: Generic rollbacks (0xC1900101) or unexpected reboots. |
Log entry structure
A setupact.log or setuperr.log entry (files are located at C:\Windows) includes the following elements:
- The date and time — 2016-09-08 09:20:05.
- The log level — Info, Warning, Error, Fatal Error.
- The logging component — CONX, MOUPG, PANTHR, SP, IBSLIB, MIG, DISM, CSI, CBS.
- The logging components SP (setup platform), MIG (migration engine), and CONX (compatibility information) are particularly useful for troubleshooting Windows Setup errors.
- The message — Operation completed successfully.
See the following example:
Date/Time | Log level | Component | Message |
---|---|---|---|
2016-09-08 09:23:50, | Warning | MIG | Could not replace object C:\Users\name\Cookies. Target Object cannot be removed. |
Analyze log files
The following instructions are meant for IT professionals. Also see the Upgrade error codes section in this guide to familiarize yourself with result codes and extend codes.
To analyze Windows Setup log files:
- Determine the Windows Setup error code. This code should be returned by Windows Setup if it is not successful with the upgrade process.
- Based on the extend code portion of the error code, determine the type and location of a log files to investigate.
- Open the log file in a text editor, such as notepad.
- Using the result code portion of the Windows Setup error code, search for the result code in the file and find the last occurrence of the code. Alternatively search for the «abort» and abandoning» text strings described in step 7 below.
- To find the last occurrence of the result code:
- Scroll to the bottom of the file and click after the last character.
- Click Edit .
- Click Find .
- Type the result code.
- Under Direction select Up.
- Click Find Next.
- When you have located the last occurrence of the result code, scroll up a few lines from this location in the file and review the processes that failed just prior to generating the result code.
- Search for the following important text strings:
- Shell application requested abort
- Abandoning apply due to error for object
- Decode Win32 errors that appear in this section.
- Write down the timestamp for the observed errors in this section.
- Search other log files for additional information matching these timestamps or errors.
For example, assume that the error code for an error is 0x8007042B — 0x2000D. Searching for «8007042B» reveals the following content from the setuperr.log file:
Some lines in the text below are shortened to enhance readability. The date and time at the start of each line (ex: 2016-10-05 15:27:08) is shortened to minutes and seconds, and the certificate file name which is a long text string is shortened to just «CN.»
The first line indicates there was an error 0x00000570 with the file C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18 [CN] (shown below):
The error 0x00000570 is a Win32 error code corresponding to: ERROR_FILE_CORRUPT: The file or directory is corrupted and unreadable.
Therefore, Windows Setup failed because it was not able to migrate the corrupt file C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18[CN]. This file is a local system certificate and can be safely deleted. Searching the setupact.log file for additional details, the phrase «Shell application requested abort» is found in a location with the same timestamp as the lines in setuperr.log. This confirms our suspicion that this file is the cause of the upgrade failure:
This analysis indicates that the Windows upgrade error can be resolved by deleting the C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18[CN] file. Note: In this example, the full, unshortened file name is C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18\be8228fb2d3cb6c6b0ccd9ad51b320b4_a43d512c-69f2-42de-aef9-7a88fabdaa3f.