Sub topic 14
Event Viewer: logs and event levels
Event Viewer is the Microsoft Management Console (MMC) snap-in that shows the records Windows and its applications write about what they do. This chapter assumes you can open an MMC snap-in, know the difference between a service and an application, and can read a timestamp. You do not need to have used Event Viewer before.
When a PC crashes, a service refuses to start, or a user cannot sign in, the cause is often already recorded here. For the A+ Core 2 exam, you should be able to open it, pick the right log, read an event's level, and filter to the relevant entries.
Opening Event Viewer
Any of these methods works:
- Press Win+R, type
eventvwr.msc, and press Enter. - Right-click Start and choose Event Viewer.
- Open Computer Management and expand System Tools, then Event Viewer.
Reading the logs does not require administrator rights for most logs. The Security log does. Clearing a log, or changing its settings, also requires administrator rights.
The window has three panes. The left pane holds the log tree. The middle pane lists events, with a preview of the selected event below it. The right pane lists actions such as Filter Current Log, Clear Log, and Save All Events As.
The Windows Logs
Under Windows Logs, there are five logs. The first three are the ones the exam stresses.
| Log | What it records | Typical use |
|---|---|---|
| Application | Events from installed programs, such as a crash in a browser or a database error | An app closes unexpectedly |
| Security | Audit events such as successful and failed sign-ins, if auditing is enabled | Checking who tried to sign in |
| System | Events from Windows itself: drivers, services, hardware, startup, and shutdown | A service fails or a driver will not load |
| Setup | Events from installing Windows features and updates | An update fails to install |
| Forwarded Events | Events collected from other computers | Central monitoring in a managed network |
Below Windows Logs is the Applications and Services Logs section. It holds logs for individual components. For example, Microsoft > Windows has many subfolders, each with its own log.
Security events appear only for what the audit policy covers. If nobody has enabled auditing of logon events, a failed sign-in may not appear. That policy is set in Local Security Policy, which a later chapter covers.
Event levels
Each event has a level that tells you how serious it is.
| Level | Meaning | Example |
|---|---|---|
| Information | An operation succeeded | A service started normally |
| Warning | Something is not an error yet but may become one | Low disk space |
| Error | A problem occurred and a feature failed | A service failed to start |
| Critical | A failure the system could not recover from | An unexpected shutdown (Kernel-Power, Event ID 41) |
The Security log uses a different pair of labels: Audit Success and Audit Failure. An Audit Failure for a logon means someone tried to sign in and was refused.
Do not read every Error as an emergency. A healthy system logs some errors, such as a device that was not ready at the moment of a query. Look for errors that appear around the time of your symptom, and for the same error repeating.
What is inside an event
Select an event to see its details. These fields matter most:
- Level, Date and Time. Compare the time with when the user first noticed the problem.
- Source. The program or component that wrote the event, such as
Service Control ManagerorDisk. - Event ID. A number that identifies the type of event. The same ID from the same source always means the same thing, so you can search for it online.
- Task Category and Keywords. Extra labels that help group events.
- User and Computer. The account and machine involved.
- General tab. A text description of what happened.
- Details tab. The same data in a structured form, as Friendly View or XML View.
The Event ID is the best search term. An entry such as "Source: Service Control Manager, Event ID 7000" tells you a service failed to start, and you can search for that exact combination.
Finding the relevant events
A busy system can hold tens of thousands of events. These actions narrow them down.
- Filter Current Log. In the Actions pane, choose Filter Current Log. You can limit by time range, level, source, and Event ID. For example, tick Critical and Error and choose Last 24 hours.
- Create Custom View. A custom view saves a filter across several logs so you can reuse it. The built-in Administrative Events view already combines Critical, Error, and Warning from all administrative logs.
- Find. Searches the text of the events in the current log.
- Sort. Click a column header, such as Date and Time, to order the list.
Managing logs
Each log has a maximum size. Right-click a log and choose Properties to see it. The default behavior is to overwrite older events when the log is full. You can instead archive the log or stop recording when it is full. Stopping the recording is risky, because new events are then lost.
Other useful actions are:
- Save All Events As writes the log to an
.evtxfile. A technician can attach it to a ticket or open it on another computer. - Clear Log removes all events. Clearing destroys evidence, so save the log first. Clearing the Security log also creates an event that records who cleared it.
- Attach a Task to this Event creates a scheduled task that runs when a given event occurs, for example to send an email.
Reading logs from the command line
You can query logs without the graphical tool. The wevtutil command is the built-in utility. This example shows the five most recent System events in readable text form.
wevtutil qe System /c:5 /rd:true /f:textHere qe means query events, /c:5 limits the count to five, /rd:true reads the newest first, and /f:text prints plain text. The exam rarely asks for this syntax, but it is useful when you work in a remote command session.
Common errors and mistakes
- Looking in the wrong log. An application crash is usually in Application, not System. If you find nothing, check the other log before concluding that nothing was recorded.
- Ignoring the time. If you do not match events to the moment of the symptom, you will chase unrelated old errors.
- Expecting Security events by default. Without auditing, there may be no sign-in failure to see.
- Clearing the log before saving it. The evidence is gone.
- Treating one Warning as the cause. Warnings are often normal background noise.
- Not running as administrator. Some logs and actions are blocked for standard users.
Exercise
A user says their PC restarted by itself overnight and they lost unsaved work. Which Event Viewer log and which level would you check first, and what would a Critical event with Source Kernel-Power and Event ID 41 tell you?
Show answer
Check the System log, filtered to Critical and Error for the time of the restart. A Kernel-Power Event ID 41 Critical event means the system restarted without shutting down cleanly, for example after a power loss, a crash, or a hardware fault. It points you toward checking power, overheating, drivers, and memory next.
Exercise
A coworker wants to know who failed to sign in to a shared PC last week, but the Security log shows no sign-in failures. Name one likely reason and the tool where you would fix it.
Show answer
Auditing of logon events is probably not enabled, so Windows never recorded Audit Failure events. The audit policy is configured in Local Security Policy (or Group Policy Editor), under Advanced Audit Policy Configuration or Local Policies > Audit Policy. Past failures cannot be recovered, but future ones will be logged.