Using SMS Trace

[Previous] [Next]

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.

Installing SMS Trace

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:

  1. From this directory, execute Traceinst.exe to launch the SMS Trace Installation Wizard. The Welcome screen will appear, as shown in Figure 5-42.
  2. click to view at full size.

    Figure 5-42. The SMS Trace Installation Wizard Welcome screen.

  3. Click Next to view descriptive information about SMS Trace. Click Next again to display the Select Destination Directory screen, shown in Figure 5-43, where you can confirm or select a destination directory. Click Next twice to perform the installation.
  4. click to view at full size.

    Figure 5-43. The Select Destination Directory screen.

  5. When the installation is complete, a message box will appear telling you so. Click OK.

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:

  1. Navigate to the Support folder in the updated source file location.
  2. 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.
  3. click to view at full size.

    Figure 5-44. The SMS 2.0 Supportability Files Installation Wizard Welcome screen.

  4. 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.
  5. click to view at full size.

    Figure 5-45. The Select Destination Directory screen.

  6. Click Next to display the Ready To Install screen, shown in Figure 5-46. Click Next once more to begin the installation process.
  7. click to view at full size.

    Figure 5-46. The Ready To Install screen.

  8. 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.
  9. click to view at full size.

    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:

  1. Start SMS Trace from the Systems Management Server program group. The SMS Tracer window will appear, as shown in Figure 5-48.
  2. Choose Open from the File menu or click the File Open icon on the toolbar to display the Open dialog box. SMS Trace will automatically default to the SMS\Logs directory.
  3. click to view at full size.

    Figure 5-48. The SMS Tracer window.

  4. Select the log file you want to open and click Open, or double-click on the filename. The contents of the log file will be displayed in the SMS Tracer window, as shown in Figure 5-49.
  5. click to view at full size.

    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.

click to view at full size.

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.

Searching for Text

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:

  1. Start SMS Trace and open the log file you want to search. Select the first log entry.
  2. Choose Find from the Search menu to display the Find dialog box, shown in Figure 5-51.
  3. Figure 5-51. The Find dialog box.

  4. Enter the text string you want to search for. This can be a partial string. To make this a case-sensitive search select the Case Sensitive check box.
  5. Click Next. The entry that contains the text string you entered will be highlighted if it exists.
  6. To view the next entry with this text string, choose Find from the Search menu and then click on Next in the Find dialog box, or simply press F3. To view the previous entry, click on Previous in the Find dialog box, or simply press F4.

Highlighting Text

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:

  1. Start SMS Trace.
  2. Choose Highlight from the Highlight menu to display the HighLight dialog box, shown in Figure 5-52.
  3. Figure 5-52. The HighLight dialog box.

  4. Enter the text string you want SMS Trace to look for. This can be a partial string. To make this a case-sensitive search, select the Case Sensitive check box.
  5. You can also have SMS Trace initiate a simple command-line action, such as a NET SEND, by entering the command in the Action text box and then selecting Enabled Action.
  6. Click OK.
  7. Open the desired log file or files. As the log files are opened, any entry that contains the referenced string will be highlighted with a box surrounding the entry.

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.

Filtering the SMS Trace View

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:

  1. Start SMS Trace and open the log file or files you want to filter.
  2. Choose Filter from the View menu to display the Filter dialog box, shown in Figure 5-53.
  3. Figure 5-53. The Filter dialog box.

  4. In the first text box under View Items Where, choose the column through which you want to apply the filter. For example, if the package ID appears in the Entry Text column, choose Entry Text from the drop-down list.
  5. In the second box under View Items Where, choose the appropriate operator. For example, if you are looking for a partial entry text string such as a package ID within a log entry, choose Contains rather than Is Equal To.
  6. In the third box under View Items Where, enter the string value that you are filtering for, such as the package ID.
  7. Click OK. SMS Trace will refresh the screen and show only the entries you filtered for.

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.exe

When 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.log

The 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.



Microsoft Systems Management Server 2.0 Administrator's Companion
Microsoft Systems Management Server 2.0 Administrators Companion (IT-Administrators Companion)
ISBN: 0735608342
EAN: 2147483647
Year: 1999
Pages: 167

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net