How Inventory History Is Maintained

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

Note

For computers running Windows NT, Windows 3.1, and MS-DOS, the Inventory Processor gives each history file a unique name¾usually, a file name with the computer's SMS ID and the extension .HMS. For Novell NetWare servers, Macintosh, 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 Binary 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 Binary MIF file, it then adds, updates, or deletes the groups specified in the Binary 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 Binary MIF file.

The Inventory Processor can add a PRAGMA statement to any group that it adds to the Binary 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 Binary 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 Binary 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 Binary 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 Binary MIF file to update the computer's Workstation Status group.