How Inventory History is Used to Maintain the SMS Inventory

For each computer running SMS, the Inventory Processor maintains a history file that contains the current inventory of that computer. These history files are placed in the SITE.SRV\INVENTRY.BOX\HISTORY directory of the site server.

Note For Microsoft® Windows NT®, Microsoft® Windows®, and Microsoft® MS-DOS® computers, the Inventory Processor gives each history file a unique name—usually, a file name with the computer's SMS identifier and the extension .HMS. For Novell NetWare servers, Macintosh workstations, and OS/2 computers, the HISTORY.MAP file maps each computer to its history file—these history files usually have unique file names and the extension .SMH. The HISTORY.MAP file is divided into sections according to architecture; each computer is listed by NetcardID, SMSID, and SMSLocation.

When the Inventory Processor processes a subsequent RAW file (or MIF file) from a computer, it compares the inventory reported in the RAW file (groups are identified by their class and keyed attributes) to the inventory reported in the computer's history file. If there are changes, the Inventory Processor creates a Delta-MIF file containing the groups whose inventories have changed (groups that have been added, updated, or deleted), and passes the file to the Inventory Data Loader. When the Inventory Data Loader detects a Delta-MIF file, it then adds, updates, or deletes the groups specified in the Delta-MIF file in the SMS database.

For example, the Operating System group has the class "MICROSOFT|OPERATING_SYSTEM|1.0" and uses the Operating System Name attribute as a key. When the Inventory Processor reads a group of this class in the RAW file, it looks for a group with the same class and an identical value for the Operating System Name attribute. If it found a RAW file that contained a group with this class and an Operating System Name of MS-DOS, the Inventory Processor would search the history file for a group with the same class and an Operating System Name of MS-DOS. The Inventory Processor would then use the data for the group in the RAW file to update the computer's history file and add the update information to a Delta-MIF file.

The Inventory Processor can add a PRAGMA statement to any group that it adds to the Delta-MIF file. A PRAGMA statement tells the Inventory Data Loader what to do with a group:

PRAGMA Meaning
SMS:Add Adds the group to the computer's inventory in the database.
SMS:Update Updates the group in the database with the information in the Delta-MIF file.
SMS:Delete Removes the group from the computer's inventory in the database.

For example, when the Inventory Processor detects that a group has been deleted, it reports the deletion by adding the group to the Delta-MIF file, using a PRAGMA="SMS:Delete" statement. If no PRAGMA is specified, the Inventory Data Loader will determine the PRAGMA. If the group exists in the database, the Inventory Processor performs an SMS:Update; if the group doesn't exist in the database, it performs an SMS:Add.

If there is no change to the computer's inventory (that is, the inventory in the history file matches the RAW file), the Inventory Processor does not report a Delta-MIF file. If a RAW file is processed later than four days after the last inventory report, and there is no change to the computer's inventory, the Inventory Processor will report a Delta-MIF file to update the computer's Workstation Status group.