Lesson 2 explained how the inventory client agents are enabled, configured, and installed. This lesson describes how inventory data is collected and stored in the site database.
After inventory is collected on the client computer, it is stored locally and sent to the CAP. The CAP then forwards inventory data to the site server and writes the data to the site database. Or, in the case of a secondary site server, inventory data is forwarded to the primary site server. If there are other site servers in the SMS hierarchy, child sites always pass inventory data to parent sites. Transferring data from child sites to parent sites is discussed in Chapter 11, "Site-to-Site Communications."
Client computer inventory collection procedures vary by operating system (Windows 16-bit or Windows 32-bit) and by inventory agent (Hardware Inventory Client Agent or Software Inventory Client Agent).
This inventory agent uses the CIM Object Manager to process computer hardware inventory. CIM Object Manager and the Management Object Format (MOF) compiler are automatically installed on the client computer when the Hardware Inventory Client Agent is installed. The MOF compiler (MOFCOMP.EXE) reads and adds classes of managed objects contained in SMS_DEF.MOF to the CIM Object Manager repository (CIM.REP), which is stored in \winroot\SYSTEM32\WBEM\REPOSITORY. For example, the Win32_NetworkAdapter class in SMS_DEF.MOF is compiled into the SMS_G_System_Network_Adapter class in the CIM Object Manager repository. CIM Object Manager runs on the client computer and is responsible for hardware inventory collection based on the contents of the CIM Object Manager repository. Any data not contained in the repository are extracted directly from the providers. In the case of the network adapter, values for the adapter are extracted by the Win32 network adapter provider.
To determine when hardware inventory data should be collected, the SMS Client Service examines the registry key, HKLM\SW\MS\SMS\CLIENT\SITES\sitecode\CLIENT COMPONENTS\HARDWARE INVENTORY AGENT. If it is determined that inventory should be collected, the SMS Client Service informs the Hardware Inventory Client Agent (HINV32.EXE) to request hardware inventory from the CIM Object Manager and its providers.
The first time inventory collection is run, the client agent waits 30 minutes and then creates an inventory file with an HIC extension. When only changes to inventory (delta inventory) need to be sent, the client agent creates an inventory file with an HID extension. The complete inventory or delta inventory data is then moved to the \windir\MS\SMS\CLICOMP\HINV\OUTBOX directory with an INV extension. Inventory data in the OUTBOX directory is passed from the client computer to the CAP using a program called the SMS Copy Queue. Figure 3-4 shows the Hardware Inventory Client Agent inventory collection process.
Figure 3-4. The hardware inventory collection process.
For additional details on the Windows 32-bit hardware inventory collection process, find the "The Hardware Inventory Client Agents" flow diagram in Appendix D of the SMS Administrator's Guide.
NOTE
Custom inventory processing is also done by the Hardware Inventory Client Agent. This function is discussed in Lesson 4.
CIM Object Manager is not supported on client computers running Windows 16-bit operating systems. Therefore, the Hardware Inventory Client Agent (HINV16.EXE) calls individual hardware routines, such as GETIRQ.EXE, to collect hardware inventory data. SMS_DEF.MOF is consulted to determine which hardware inventory classes are to be collected. HINV16.EXE stores collected hardware inventory as *.RAW files in the \windir\MS\SMS\CLICOMP\HINV\OUTBOX directory. The SMS Copy Queue copies the RAW file to the CAP for further processing. Unlike HINV32.EXE, the Windows 16-bit version of the Hardware Inventory Client Agent sends the full inventory to the CAP, and the burden of determining whether hardware inventory has changed is placed on the site server.
To determine when hardware inventory data should be collected, the SMS Client Service examines the [Sites - sitecode - Client Components - Hardware Inventory Agent] section of the SMSCFG.INI file in the \windir directory. If it is determined that inventory should be collected, the Hardware Inventory Client Agent runs.
Neither the Windows 16-bit nor the Windows 32-bit Software Inventory Client Agents use CIM Object Manager to collect software inventory. The Client Component Installation Manager installs the software inventory client components. After installation, the SMS Client Service waits 30 minutes, then instructs the Windows 32-bit Software Inventory Client Agent (SINV32.EXE) to audit the local hard drives for files specified on the Inventory Collection tab in the SMS Administrator console. Collected software inventory is then written to the SINV.HIS file located in the \windir\MS\SMS\CLICOMP\SINV\ directory. All files specified for collection on the File Collection tab in the SMS Administrator console are written to the windir\MS\SMS\CLICOMP\SINV\FILECOL directory. Inventory data collection and file collection are combined in a single file called SINVDAT.SIC, which is stored in the SINV directory. After software inventory has been run once, the Software Inventory Client Agent compares the new SINV.HIS file with the previously collected version of this file. If the new SINV.HIS is different from the original version, the Software Inventory Client Agent creates a delta inventory file named SINVDAT.SID and appends to it any files in the FILECOL directory. From this point on, both the SINVDAT.SIC and the SINVDAT.SID are processed in the same way. (Note that when the two files are discussed collectively, they will be referred to as SINVDAT.SI?.) The Software Inventory Client Agent copies SINVDAT.SI? to the OUTBOX directory and renames the file with an INV extension and a random eight character prefix. The SMS Copy Queue then moves the INV file to the CAP for further processing. The software inventory collection process is shown in Figure 3-5.
Figure 3-5. The software inventory collection process.
The procedures for installing the Windows 16-bit Software Inventory Client Agent components and then processing software inventory on a Windows 16-bit client computer are similar to those performed on a Windows 32-bit client computer. The primary differences in the Windows 16-bit software inventory function are:
After inventory is collected by the inventory agents, the inventory file is given a unique eight-character prefix (an extension appropriate to the inventory agent) and transferred to the CAP by the SMS Copy Queue. Unique prefix naming is important since many client computers can send their inventory data to the CAP simultaneously. If the file is not renamed, it could be overwritten before it is sent to the site server from the CAP. Suffix (extension) naming based on the client agent and operating system type is important so that threads of the SMS Executive know how to process the inventory. The following suffix names are used to process inventory placed on the CAP:
Hardware inventory files are transferred from the client computer to the \CAP_sitecode\INVENTRY.BOX directory. Software inventory is transferred from the client computer to the \CAP_sitecode\SINV.BOX directory. Inventory data residing on the CAP is then sent to the site server by the Inbox Manager Assistant, a thread of the SMS Executive.
NOTE
Inventory data is also sent to parent sites in the SMS site hierarchy. Moving data through the site hierarchy is discussed in Chapter 11.
Since the site server does not need to maintain history for client computers running CIM Object Manager, NHM files are used by the Windows 32-bit Hardware Inventory Client Agent. CIM Object Manager maintains a complete history of the client computer locally, so smaller delta inventory files are sent to the CAP for processing on the site server. This approach to inventory maintenance reduces the processing load placed on the site server and reduces use of the network.
RAW files are used by the Windows 16-bit Hardware Inventory Client Agent, since this hardware inventory agent does not maintain hardware history data.
Notice in Figure 3-6 that RAW files are numbered sequentially and that NHM files are randomly named. Also notice the difference in size between a RAW file and an NHM file. RAW files contain complete inventory, while NHM files contain either a complete inventory or only changes to the inventory.
The Inbox Manager Assistant transfers all hardware inventory files to \smsdir\INBOXES\INVENTRY.BOX on the site server. As shown in Figure 3-6, the Inventory Processor (a thread of the SMS Executive) running on the site server, processes all hardware inventory files (RAW and NHM) into MIF files and moves the files to \smsdir\INBOXES\DATALDR.BOX.
Figure 3-6 shows that after hardware inventory data transfer, the RAW files shrunk in size from 47KB to just over 20KB, while the NHM files did not change in size. The Inventory Processor converts RAW files into binary MIF files, but little processing of NHM files takes place. In the conversion of RAW files into MIF files, the Inventory Processor builds a delta inventory MIF file for Windows 16-bit client computer inventory data. It does this by checking the \smsdir\INBOXES\INVPROC.BOX\HISTORY directory for a hardware inventory history file created previously for the client computer.
Once files appear in \smsdir\INBOXES\DATALDR.BOX, the Inventory Data Loader processes the MIF files. The Inventory Data Loader verifies that the MIF files are formatted correctly before being written to the database. If the MIF files cannot be written to the database, the Inventory Data Loader stores the files in the \smsdir\INBOXES\DATALDR.BOX\BADMIFS directory.
The Inventory Data Loader compares the new inventory list with client computers in the database to flag synchronization errors, such as delta inventory taken for a computer that is not in the site database. It also uses this procedure to update the SMS database with new and changed record entries. If a hardware inventory MIF file arrives at the site server for a computer resource that has not been discovered, the Inventory Data Loader creates a data discovery record (*.DDR), which is then placed in the \smsdir\INBOXES\ DDM.BOX directory. The Discovery Data Manager processes all DDRs placed in this directory. Once discovery is complete, the Inventory Data Loader writes hardware inventory to the site database.
Figure 3-6. An overview of the hardware inventory collection process from CAP to site server.
Regardless of what Windows operating system is running on the client computer, a complete software inventory is always stored in a file with a SIC extension, and a delta inventory is always stored in a file with a SID extension. The software inventory file is transferred to the CAP in the \CAP_sitecode\SINV.BOX directory. Just as in hardware inventory, the Inbox Manager Assistant is responsible for transferring these inventory files to the site server. SINVDAT.SI? files are moved from the SINV.BOX directory on the CAP to the \smsdir\INBOXES\SINV.BOX directory on the site server. After a file arrives at the site server, all software inventory processing is completed by the Software Inventory Processor (Figure 3-7).
After SINVDAT.SI? files appear in SINV.BOX on the site server and before software inventory is written to the database, the Software Inventory Processor completes the following tasks:
After these five steps are completed, the Software Inventory Processor stores pointer information in the site database so that collected files can be retrieved through the Resource Explorer snap-in. It also writes inventory collection data to the site database.
Figure 3-7. An overview of the software inventory collection process from CAP to site server.
The Inventory Data Loader and the Software Inventory Processor interface directly with the site database in order to write inventory data into it. These threads of the SMS Executive do not write data blindly. Instead, they must first make sure that the MIF files are properly formatted and that there is an associated record in the database for delta inventory. If these conditions are not met, either thread of the SMS Executive issues a resynchronization. Resynchronization is a corrective process that causes the inventory agent to run a complete inventory on a client computer. The following events cause inventory resynchronization:
When these events take place, the inventory agent generates a complete hardware inventory and replaces the existing history data (if the inventory agent supports local history data) with complete inventory data.
Through the exercises in Chapter 2, you prepared SMS to install the inventory client agents on discovered computer resources. In this exercise, you will observe the flow of inventory data from the client computer (Computer 2) to the site server.
In this exercise, you will use the SMS Service Manager to stop threads of the SMS Executive that are responsible for inventory processing.
A menu of choices appears.
The sms (Systems Management Server) MMC appears.
Nodes below the Tools node appear.
The SMS Service Manager is highlighted.
The SMS Service Manager window appears.
The Components and Servers nodes appear.
All SMS Components appear in the right pane of the SMS Service Manager node.
All SMS Components in the right pane are selected.
The status of all SMS components running on the site server appear in the right pane.
The Status column shows that the service has stopped. This service is responsible for ensuring that all enabled services are running. It must be disabled before you can complete this exercise, since you will manually control a number of SMS services.
SMS_INBOX_MANAGER_ASSISTANT
SMS_INVENTORY_PROCESSOR
SMS_INVENTORY_DATA_LOADER
SMS_SOFTWARE_INVENTORY_PROCESSOR
The selected services now show a status of being disabled. These services are involved in the inventory collection process from the CAP to the site server.
The Run dialog box appears.
The D:\CAP_S01\inventry.box window appears.
D:\SMS\INBOXES\INVENTRY.BOX
D:\CAP_S01\SINV.BOX
D:\SMS\INBOXES\SINV.BOX
D:\SMS\INBOXES\DATALDR.BOX
You have prepared the site server to observe the inventory collection process. After Lesson 4, you will observe inventory collection and use the Resource Explorer, described in the next lesson, to view collected inventory data.