How to Use CMTrace to Read SCCM Logs (and OneTrace)
CMTrace is the log viewer that ships with Configuration Manager. It shows new log lines as they are written, marks errors in red and translates error codes into text. On a computer with the SCCM client, start it from C:\Windows\CCM\CMTrace.exe.
Where CMTrace.exe is
| Place | Path |
|---|---|
| A computer with the SCCM client | C:\Windows\CCM\CMTrace.exe |
| The site server | The tools folder under the Configuration Manager install folder |
| Windows PE from an SCCM boot image | Type cmtrace at the F8 command prompt |
CMTrace is one file. It needs no install. You can copy it to a tools share or a USB drive and run it from there.
The first time you start it, CMTrace asks to become the default viewer for log files. Choose Yes on your own admin computer. After that, a double-click on any .log file opens it in CMTrace.
Open a log
- Start CMTrace.
- Select File, then Open.
- Browse to the log folder. For client logs this is
C:\Windows\CCM\Logs. - Select the log and select Open.
To read logs on another computer, type the admin share in the file name box: \\COMPUTERNAME\C$\Windows\CCM\Logs. You can also drag a log file onto the CMTrace window.
Not sure which log to open? Use the table in SCCM client log files: which log to read.
Read the window
The top pane lists the log lines. Each line has the log text, the component that wrote it, the date and time, and the thread number.
The bottom pane shows the full text of the selected line. Use it for long lines, such as a command line or a list of distribution points.
| Line colour | Meaning |
|---|---|
| Red | An error, or a line that contains the word "error" or "fail". |
| Yellow | A warning. |
| No colour | Information. |
The colours are a hint, not a verdict. Many red lines are harmless, because CMTrace also colours lines by the words in them. A line such as "Failed to find a newer version" can be normal. Read the text before you chase the colour.
Watch a log live
CMTrace reads the file again and again while it is open. New lines appear at the bottom as the client writes them. This is the live tail.
- Open the log, for example
AppEnforce.log. - Scroll to the last line. CMTrace now follows new lines.
- Start the action on the client, for example an install from Software Center.
- Watch the lines arrive.
Use the Pause button on the toolbar to stop the scrolling while you read. Select it again to continue. No lines are lost while the view is paused.
For a busy log, tick Ignore existing lines in the Open dialog. CMTrace then shows only the lines written after you opened the file.
Find, highlight and filter
All three are in the Tools menu.
| Tool | What it does | Use it when |
|---|---|---|
| Find (Ctrl+F) | Jumps to the next line that contains your text. Press F3 for the next match. | You know an error code, a package ID or an application name. |
| Highlight | Colours every line that contains your text. All other lines stay visible. | You want to follow one application or one content ID through a busy log. |
| Filter | Hides every line that does not match your rule. | The log is too noisy to read. |
The filter can test four things: the entry text, the component, the thread and the time. A filter on the time is a quick way to cut a large log down to the ten minutes you care about.
A filter on the thread is useful too. One thread often handles one job from start to end. Find one line of your job, note its thread number, then filter on that thread.
Remove the filter when you are done. A forgotten filter hides lines, and the log then looks as if nothing happened.
Look up an error code
SCCM logs show errors as numbers, such as 0x80070005 or -2147024891. CMTrace can translate them.
- Press Ctrl+L, or select Tools, then Error Lookup.
- Type or paste the code. Hex and decimal both work.
- Select Lookup.
CMTrace shows the text of the error and its source, such as Windows or Windows Update Agent. The text tells you what the code means, not why it happened in SCCM. For causes and fixes, search the code in the SCCM error code library. You can also use the Windows error code lookup when CMTrace is not at hand.
Merge several logs
One client action often writes to several logs. A content download writes to CAS.log, ContentTransferManager.log and DataTransferService.log. CMTrace can show them as one list in time order.
- Select File, then Open.
- Hold Ctrl and select each log you want.
- Tick Merge selected files.
- Select Open.
The component column helps you tell the sources apart. A merged view updates live, like a single log.
Merge only the logs for one problem. Three or four logs are easy to read. Ten logs are not.
OneTrace, the newer viewer
OneTrace is a newer log viewer from Microsoft. It is part of the Support Center tools for Configuration Manager. It reads the same logs as CMTrace and also follows them live.
| Topic | CMTrace | OneTrace |
|---|---|---|
| Install | None. One exe file. | Installed with Support Center. |
| Several logs | One window per log, or one merged view. | Tabs in one window, plus a merged view. |
| Where it is | On every SCCM client and in boot images. | Only where you install Support Center. |
To get OneTrace, install Support Center on your admin computer. The installer is on the site server, in the cd.latest\SMSSETUP\Tools\SupportCenter folder under the Configuration Manager install folder. Run SupportCenterInstaller.msi. After the install, find OneTrace in the Start menu.
Use OneTrace on your own computer for long reading sessions. Use CMTrace on clients and in Windows PE, because it is already there.
Common problems
- The log looks like one long block of text. You opened it in Notepad. Open it in CMTrace.
- The log stops early. The log rolled over. Open the older file with the date in its name, in the same folder.
- Access is denied. Start CMTrace as administrator. The client log folder needs admin rights.
Comments