Home > Articles > Operating Systems, Server > Microsoft Servers

This chapter is from the book

Viewing Detailed Process Activity

The “WMI in ConfigMgr,” “Components and Communications,” and “Inside the ConfigMgr Database” sections described the ConfigMgr technical architecture. This section presents some tools you can use to view the inner working of ConfigMgr in detail. The section includes a detailed example to illustrate the use of these tools.

System Center 2012 ConfigMgr provides two built-in mechanisms that allow you to view and analyze ConfigMgr operations in detail:

  • ConfigMgr components generate status messages to report milestone activity and problem occurrences. System administrators can view status messages and use them in queries and reports. You can also configure the status message system to invoke automated actions in response to specified status messages.
  • ConfigMgr components generate extensive logs that give additional detail about their activity.

Both the status message system and logging are highly configurable and provide valuable windows into the system.

Digging into ConfigMgr logs is one of the best ways to gain a deep understanding of ConfigMgr internals. Much of the material in this chapter is drawn from analyzing log files. Chapter 21 covers configuring the status message system. Appendix A discusses the various ConfigMgr logs in detail. This part of the chapter discusses the use of status messages and logs for looking at the inner working of ConfigMgr.

The ConfigMgr logs are text files, and you can view them in Windows Notepad or your favorite text editor. Most administrators prefer to use the ConfigMgr Trace Log Tool (CMTrace) rather than a text editor to display log files. The log viewer formats log entries, provides search and highlighting features, and provides error lookup. You can optionally turn on an auto-refresh feature to update the displayed log in near real time.

Process Monitor is a tool you can use to capture detailed process activity on Windows systems. It provides extensive filtering options that allow you to drill down on activity related to specific folders, view only the operation of selected threads, and so forth. More information on Process Monitor and a link to download this useful tool are available at http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx.

The SQL Server Profiler allows you to capture detailed activity on your SQL Server. The profiler provides extensive filtering options that allow you to record the specific SQL activity in which you are interested. You can use this tool though the SQL Server Profiler user interface or use the ConfigMgr stored procedures spDiagStartTrace and spDiagStopTrace to capture activity ConfigMgr SQL activity. SQL Server Profiler ships with Microsoft SQL Server; the SQL Online Books describe its use in detail.

The “Components and Communications” section presented an example of how ConfigMgr components work together to process a site change. This section takes a closer look at WMI and SQL activity associated with the same site change as captured in logs and other tools. In this example, an administrator uses the ConfigMgr console to modify a site component. This results in the following sequence of events:

  1. The console application invokes the SMS Provider WMI object for the modified site control item. The SMS Provider log file (smsprov.log) shows this activity.
  2. The provider implements code that applies the update to the database. You can use either the SQL Server Profiler tool or the ConfigMgr SQL logging option to capture the SQL statements the provider uses.
  3. The database contains special stored procedures, known as triggers, which automatically carry out additional processing when the update occurs. The triggers write records for auditing purposes and to provide notification to the Database Notification Monitor (SMSDBMON) component. You can use SQL Management Studio to locate and understand the triggers.
  4. SMSDBMON processes the data and notified additional components of the change. The Database Notification Monitor log (smsdbmon.log) shows SMSDBMON polling the database for changes. The Process Monitor tool shows file system activity by the Database Notification Monitor thread as it writes to other components’ inboxes.
  5. Additional threads carry out work to complete the site change. These threads record their activity in status messaged and logs.

Here is a detailed look at the activity just described.

Figure 3.38 shows a portion of the smsprov.log file as displayed in the log viewer.

Figure 3.38

Figure 3.38. Smsprov.log displayed in the Log Viewer (SMS Trace).

The smsprov.log file shows calls to the SMS Provider from management applications. The bottom pane of the log viewer displays the details of the highlighted log entry. The entry in Figure 3.35 shows that the user ODYSSEY\bholt modified an instance of class SMS_SCI_SiteDefinition. The SMS_SCI_SiteDefinition, displayed in Figure 3.39, provides an interface to binary data stored in the SiteControl table.

Figure 3.39

Figure 3.39. The SMS_SCI_SiteDefinition WMI class displayed in the WMI Object Browser.

Using the SQL Server Profiler lets you see SQL requests sent to the SQL Server database. (For information about the SQL Server Profiler, see http://msdn.microsoft.com/en-us/library/ms187929.aspx.)

The following SQL commands show the application SMS Provider inserting data into the vSMS_SC_SiteDefinition_Properties view:

IF NOT EXISTS (select 1 from vSMS_SC_SiteDefinition_Properties where ID = 0 and Name
= N'Comments'
)
insert into vSMS_SC_SiteDefinition_Properties (ID, Name, Value1, Value2, Value3)
values (0, N'Comments', N'Central Administration Site (CAS)', N'', 0)
 ELSE update vSMS_SC_SiteDefinition_Properties set ID = 0, Name = N'Comments',
Value1 
= N'Central Administration Site (CAS)', Value2 = N'', Value3 = 0  where ID = 0 and 
Name = N'Comments'

You can use SQL Server Management Studio to view the underlying tables for a view. Figure 3.40 shows that vSMS_SC_SiteDefinition_Properties is based on the SC_SiteDefinition_Property table.

Figure 3.40

Figure 3.40. The Site Definition Properties View depends on the SC_SiteDefinition_Property table.

Figure 3.41 shows the SC_SiteDefinition_Property table in the Object Explorer tree on the left with the text of the SMSDBAudit trigger in the right text pane. A trigger is a special type of SQL stored procedure that runs automatically when changes are made to table data. The SMSDB Audit trigger (SMSDBAuditTrigger_SC_SiteDefinition_Property_INS_UPD_DEL) inserts a row into the SCCM_Audit table when the data in the SC_SiteDefinition_Property table changes.

Figure 3.41

Figure 3.41. The SC_SiteDefinition_Property Table displaying a trigger definition.

The following query displays entries in the SCCM_Audit table associated with changes made by the SMS Provider:

SELECT [ID], [TransactionID], [TableName], [By_Machine], [By_User]
      ,[By_Component], [ChangeXML], [ChangeTime]
  FROM [CM_CAS].[dbo].[SCCM_Audit]
  WHERE By_Component = 'SMS Provider' and TableName = 'SC_SiteDefinition_
PropertyList'

The ChangeXML column from the site description change is as follows:

<Changes><Change OP="U"><NewValue><row ID="68" SiteNumber="0" Name="Comments"
Value1="Central (CAS) site" Value2="" Value3="0" /></NewValue>
<OLDValue><row ID="68" SiteNumber="0" Name="Comments" Value1="CAS site"
Value2="" Value3="0" /></OLDValue></Change></Changes>

Another trigger, SMSDBMON_SC_SiteDefinition_Property_SQLServerSSBPORT_UPD_HMAN_upd, inserts data into the TableChangeNotifications table as follows:

BEGIN
    INSERT INTO TableChangeNotifications(Component,TableName,ActionType,Key1,Key2,Key3)

        SELECT all 
N'SQLServerSSBPORT_UPD_HMAN',N'SC_SiteDefinition_Property',2,IsNULL(convert(nvarchar
(256),SiteNumber),N''),N'',N'' FROM inserted WHERE Name = 'SSBPort' AND 
UPDATE(Value3) AND (dbo.fnIsParentOrChildSite(SiteNumber) != 0 OR SiteNumber = 
dbo.fnGetSiteNumber())

    IF @@ERROR != 0 ROLLBACK TRAN
END

The SMSDBMON prefix indicates that this trigger is owned by the ConfigMgr Database Notification Monitor component. Many of the database tables have triggers that write to the TableChangeNotifications table when changes occur. The Database Notification Monitor log (smsdbmon.log) shows the activity of the maintenance thread, which maintains these triggers. The same thread also maintains the various site maintenance tasks in the database.

The Database Notification Monitor polling thread regularly executes the spGetChangeNotifications stored procedure shown in this SQL Server Profiler trace:

[SMS_DATABASE_NOTIFICATION_MONITOR] exec spGetChangeNotifications

The spGetChangeNotifications stored procedure reads the TableChangeNotifications table in batches of up to 1000 transactions. The Database Notification Monitor then processes any new entries it finds. The smsdbmon file shows the following activity from the polling thread:

RCV: UPDATE on SiteControl for SiteControl_AddUpd_HMAN [CAS  ][9811]
RCV: UPDATE on SiteControl for SiteControl_AddUpd_SiteCtrl [CAS  ][9812]
SND: Dropped F:\Program Files\Microsoft Configuration Manager\inboxeshman.box\CAS.SCU  [9811]
SND: Dropped F:\Program Files\Microsoft Configuration Manager\inboxessitectrl.box\CAS.CT0  [9812]
SQL>>>delete from TableChangeNotifications where RecordID in (9811,9812)

Notice the Database Notification Monitor receives notifications that site control data has been updated and drops files in the Hierarchy Manager and Site Control Manager inboxes. These are zero byte files; however, Windows generates a directory change notification when the file is created. ConfigMgr components subscribe to change notifications for their inboxes. The SQL command in the final log entry deletes the change notification entries after processing the changes. This is why you cannot directly view the output of the associated trigger in the TableChangeNotifications table as was possible with the SCCM_Audit table.

To see even more detail of the process activity that carries out the site modification, use Process Monitor to capture the file system activity of the SMSExec process during the site change. Here is a partial listing for some Process Monitor event details during the site change, with comments added:

***SMSDBMON file drops files in HMAN and SITECTRL inboxes***
Event Class:      File System
Operation:        CreateFile
Result:  SUCCESS
Path:    F:\Program Files\Microsoft Configuration Manager\inboxes\hman.box\CAS.SCU
Event Class:      File System
Operation:        CreateFile
Result:  SUCCESS
Path:    F:\Program Files\Microsoft Configuration Manager\inboxes\sitectrl.box\CAS.CT0
*** SMSEXEC thread 5248 detects a Directory Change Notification***
*** Thread ID 5248 matches a thread ID in the Hierarchy Manager log***
Name:    smsexec.exe
Event Class:      File System
Operation:        NotifyChangeDirectory
Result:  SUCCESS
Path:    F:\Program Files\Microsoft Configuration Manager\inboxes\hman.box
TID:     5248
Duration:         27.4709051
Filter:  FILE_NOTIFY_CHANGE_FILE_NAME, FILE_NOTIFY_CHANGE_DIR_NAME

Several threads detect the file system changes. The Hierarchy Manager does much of the processing and will serve as an example of ConfigMgr process activity. The Hierarchy Manager Log (Hman.log) now shows:

Processing site control file: Site CAS

The actual processing is performed by executing SQL statements against the database. With SQL Tracing enabled, the log then shows a large number of SQL SELECT statements retrieving data from tables and views such as SC_SiteDefinition, vSMS_SC_SiteDefinition_Properties and vSMS_SC_Component_Properties. After retrieving data about the site, Hierarchy Manager logs the following entry:

Update the Sites table: Site=CAS Parent=

This is followed by a number of SQL statements, including updates to the SysReslist table and calls to the spUpdateSites stored procedure, which updates the Sites table. Hierarchy Manager then updates the SiteControlNotification table to create a site control notification for the site. Finally, the thread raises the following status message:

Hierarchy Manager successfully processed "F:\Program Files\Microsoft Configuration 
Manager\inboxes\hman.box\CAS.SCU", which represented the site control file for site 
"Odyssey Central Site" (CAS).

Process Monitor can display registry access as well as file access. You could use Process Monitor to see the details of Hierarchy Manager retrieving the registry values it uses to construct a connection string to the site database and accessing the SQL client libraries to initiate the database connection.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020