As discussed in Chapter 3, log files are simply text files that can be read using any text editor. However, trying to scroll through several long log file entries using Notepad can become tedious, if not frustrating. Fortunately, SMS 2.0 includes an updated version of the SMS Trace utility that provides a nicer interface for viewing log files. Each log entry is easily readable, ordered, and time-stamped. In addition, the view is dynamically updated as components modify the log file. You can even view multiple log files at one time—a great way to learn how various components interact with each other.
SMS Trace is not installed by default when you install your SMS site server. However, it can be installed on any site server or site system or, preferably, on the Windows NT workstation running the SMS Administrator Console. SMS Trace is located on the SMS 2.0 CD in the directory Support\Reskit\Bin\platform\SMSTrace, where platform represents either the Alpha or i386 platforms. To install the SMS Trace utility, follow these steps:
Figure 5-42. The SMS Trace Installation Wizard Welcome screen.
Figure 5-43. The Select Destination Directory screen.
PLANNING
As you learned in Chapter 2, the process that updates SMS 2.0 with Service Pack 1 involves creating updated source files. When this occurs, the SMS 2.0 support tools are also updated. However, the support tools that previously could be found in the Support\Reskit\Bin\platform\ directory on the source file CD now appear in a self-extracting file named Support.exe in the Support folder created by the service pack update.To locate the SMS Trace utility and other support tools, you need to extract the SMS support tools. Follow these steps to extract the SMS support tools:
- Navigate to the Support folder in the updated source file location.
- Double-click on Support.exe to launch the SMS 2.0 Supportability Files Installation Wizard. The Welcome screen will appear, as shown in Figure 5-44.
Figure 5-44. The SMS 2.0 Supportability Files Installation Wizard Welcome screen.
- Click Next to display the Select Destination Directory screen, shown in Figure 5-45. Click the Browse button to select the drive and directory location where you'd like the files copied.
Figure 5-45. The Select Destination Directory screen.
- Click Next to display the Ready To Install screen, shown in Figure 5-46. Click Next once more to begin the installation process.
Figure 5-46. The Ready To Install screen.
- When the installation is complete, the wizard will display the Installation Completed screen, shown in Figure 5-47. Click Finish to end the setup process.
Figure 5-47. The Installation Completed screen.
Unless you modified the default directory name and location, you will be able to find the updated SMS 2.0 support tools in the C:\Program Files\SMS 2.0 Supportability Files directory. Expand this folder to find the Reskit\Bin\platform directory and the subdirectories that contain the SMS 2.0 support tools, and then install the SMS Trace utility as described earlier.
When specific SMS 2.0 support tools are referenced in future chapters, be sure to look for them in the SMS 2.0 Supportability Files directory if you have installed SMS 2.0 Service Pack 1.
The SMS Trace utility is added to the Systems Management Server program group and is launched from there. To use SMS Trace to view log files, follow these steps:
Figure 5-48. The SMS Tracer window.
Figure 5-49. The log file contents displayed in the SMS Tracer window.
Notice how nicely this utility displays the contents of the log file. Each entry is easy to read, ordered, and time-stamped. In addition, the view is dynamically updated as the component modifies the log file. Compare this window to the same log file opened in Notepad, shown in Figure 5-50.
Figure 5-50. The log file contents displayed using Notepad.
The SMS Trace interface offers several nice features. You can of course print the log file and modify how much data appears on the screen. SMS Trace also lets you search for text, highlight text, and filter what is displayed on screen.
If you are looking for a particular text string—perhaps a filename, an extension, a package ID, or an advertisement ID—you can ask SMS Trace to find the log entry that contains that text string. To do so, follow these steps:
Figure 5-51. The Find dialog box.
Perhaps, as you open multiple log files, you would like to highlight any entry that references a particular text string. For example, when a site setting is modified, Hierarchy Manager and Site Control Manager both create and reference files back and forth. While monitoring the flow of this interaction, you might choose to highlight the lines that reference specific files or file extensions to better view how the two components work with each other and hand files back and forth. To use SMS Trace to specify text that should be highlighted as it occurs in the log file, follow these steps:
Figure 5-52. The HighLight dialog box.
CAUTION
The Action option is really only useful for strings that appear once or twice in the log file. The action will be executed for every occurrence of the text string. Since log files are updated within SMS Trace dynamically, you might use this option to alert the administrator via a NET SEND action when a particular string occurs—for example, when a package ID is picked up by a component and referenced by the log.
Log files can get filled up quickly and can contain hundreds of entries. Perhaps you are interested only in certain types of entries—for example, status message entries or entries that contain a reference to a particular package ID. SMS Trace provides a filter tool that can facilitate your view of these kinds of entries. To filter the SMS Trace view, follow these steps:
Figure 5-53. The Filter dialog box.
NOTE
Once you have filtered a log in this manner, you cannot turn off the filter without first closing the log file. After you close the log file, you can go back into the filter, choose the option <No Filter>, and then reopen the log file.
Tracer.exeWhen you install the SMS Trace utility, SMS also installs the companion tool Tracer.exe in the SMS\SMSTrace\i386 directory. This is a command-line tool that is used to open individual log files. This tool differs from the SMS Trace utility in that the log file records the new entries as they are generated from the point where you opened the log rather than showing the entire log and all its entries (which include both the new entries and the entries generated before starting SMS Trace). This feature is useful if you want to follow the flow of a specific process and note the entries as they are created.
Tracer provides a continuously scrolling set of entries in a command window. It does not maintain history, so it may not be very effective for monitoring SMS components that generate large numbers of entries. You can open as many Tracer windows as you want to monitor different log files. You can also associate the log files with Tracer.exe so that when you double-click on a log file you automatically launch the Tracer tool.
Start Tracer by entering the following command line at a Windows NT command prompt or by choosing Run from the Start menu:
d:\SMS\SMSTrace\i386\Tracer.exe d:\SMS\Logs\filename.logThe variable filename.log represents the name of the log file you want to monitor. If you move Tracer.exe to the SMS\Logs directory, you can eliminate some of the path references.