Client Management Suite

 View Only

Altiris Inventory Solution Process Flow Walkthrough 

May 18, 2007 09:20 AM

This article details the Process Flow for Inventory Solution for Windows. Issues with Inventory Solution can be traced (with the help of this document) to discover where the failure is. Often, pinpointing a failure can lead to a solution to the problem. Hopefully this document will make troubleshooting Inventory issues easier.

The following process flow/walk-through assumes the following:

  1. The Altiris Agent is in operable condition and can obtain the Inventory Agent Package from the Notification Server or applicable Package Servers.
  2. The Altiris Agent can communicate and the Notification Server can provide updated client configuration policy XML files.

Walkthrough

  1. Inventory Tasks Enabled for Target Collections Notification Server uses a Task to Collection relationship for most Tasks, and Inventory is no different. By default all Win32 Windows computers are included in the default policies. Example:
    • Recreate Full Inventory -- All Win32 Windows Computers
    The Server updates the Computer's configuration to include the Inventory Tasks when a computer resides in the target collection.
  2. Clients request updated configuration from the NS and receive a new client policy XML file. This policy file contains the Inventory Tasks assigned to each computer. The Altiris agent hits the server URL to get its policies, and subsequently is handed a policy file in XML format that the Altiris Agent can read.
    • http://<servername>/altiris/ns/agent/getclientpolicies.aspx
    • Servername.xml -- C:\Program Files\Altiris\Altiris Agent\Client Policies
  3. The Inventory Agent Package is now downloaded to the target system. The download mechanism is the same used for any package download for the Altiris Agent, whether for Patch, Software Delivery, Core Agents, etc. The download location is based off of the Package ID (Guid), as shown.
    • C:\Program Files\Altiris\Altiris Agent\Software Delivery\{01B54EB5-3679-4C73-9E10-E169D5A5EC59}\cache
    The Inventory Guid is always 01B54EB5-etc... The only time this path would be different is if the Altiris Agent is installed to a different, non-default location.
  4. The Inventory tasks execute the given command-line of the associated Program, including an INI file reference:
    • AeXInvSoln.exe /cleanbeforerun /hidden /s AeXInvSolnAdm2.ini
    The Program is configured on the Program tab, as shown. The execution follows the provide execution environment parameters. In the above example, the task will execute only when a user is logged on, using the logged-in user's account to execute, and will execute the command-line shown in the applicable field. This is all part of the standard Notification Server Package? Program? Task process.
  5. The associated command lines in the INI file referenced in the command-line are run under the umbrella of the AeXInvSoln.exe launcher. The INI is like a batch file in that each line represents a separate Inventory Agent, and how that agent executes is based off what command-line parameters are passed with the EXE. The following example shows a typical INI file:
    aexauditpls.exe /hidden /output xml aexmachinv.exe aexcustinv.exe /in .\AeXCustInvStd.cit /out AeXCustInvStd.nsi aexsnplus.exe /output xml aexnsinvcollector.exe /hidden /nsctransport /v default /useguid
    Additional executions can be added to the Inventory as long as it falls before the Inventory Collector runs (the last shown line).
  6. As each Inventory Agent runs, it collects the inventory and places the associated data files at:
    • C:\Program Files\Altiris\eXpress\Inventory
    These files are in a filename.nsi format. The NSIs (Notification Server Inventory) files contain the data captured by the scans, in XML format. Most files are named according to their corresponding data class, or in other words the name of the tables-class where the data will be stored on the Notification Server. More on this later...
  7. The Collector compares the NSI files against the BAK files. These BAK files are generated each time Inventory runs. The comparison is a hash, and if that hash matches, the Inventory is not resent, and that data is skipped. This is called a Delta Inventory in that only the changes are sent up.
    Note: Recreate Inventory tasks wipe out the Inventory folder so all Inventory is always sent when these tasks run.
  8. The Inventory Collector parses through the collected files and compiles the data into a single filename.nse file. This file contains all the NSI fragments collected by the various Inventory Agents, with a header and footer indicating what Resource the Inventory came from.
  9. The Inventory Collector then hands the NSE it over to the Altiris Agent Transport mechanism via the last command-line in the INI file:
    • aexnsinvcollector.exe /hidden /nsctransport /v default /useguid
    The command line switch /nstransport signifies to have the Altiris Agent post the Inventory. This is highly recommended as the other method, that of having the Inventory Collector try to post the NSE directly, has only a success/fail ability. IF it fails to post, the Inventory is 'dropped'. The Altiris Agent, on the other hand, has a client-side queue located at C:\Program Files\Altiris\Altiris Agent\Queues\<NSname>\ where the NSE can be stored if the server cannot be reached.
  10. When the Altiris Agent receives the NSE from the Inventory Collector, it posts Inventory to the URL:
    • http://<servername>/altiris/ns/agent/postevent.asp (https if SSL is implemented)
    If the post fails, it will place the file in the client-side queue as previous indicated. Note that this queue will hold any data failing to be sent to the Notification Server, whatever the reason.
  11. The Notification Server Event Router captures the Inventory NSE from the postevent.asp page in one of two ways:
    • For larger NSE files (most Inventory ones) the Event Router splits the data into smaller segments as it is received and copies the segments into files at the location: \Program Files\Altiris\Notification Server\NSCap\Temp\. Once all the segments are copied down, the Event Router picks up and drops it in the NSCap\Evtqueue.
    • For smaller NSE files, the files are directly copied to the queues, depending on the size either the NSCap\Evtqueue, or NSCap\Evtqfast.
    • Once the files are copied to the queue, they are processed as soon as the Notification Server is able. If the server is under heavy load (ie: all 5000 systems are sending a Full Inventory at the same time) it may take time to process all the incoming files. Files will stack up in the respective queues.
    • All these processes are conducted via the process AeXSvc.exe.
  12. Before the Notification Server Data Loader actually inserts data into the database, it first takes the data for a particular table and uses a hash method to compare against the ResourceUpdateSummary table for previous loads for this same table in the past. If the hash matches the hash from the data that was last imported into the table, the data is discarded as it has not changed. In other words if this same computer has already sent the exact same data in the past, it will not load it. This hash comparison allows the Data Loader to avoid inserting the exact same data twice.
    Note: If data is ever manually removed from an Inventory table, the hashes remain in the ResourceUpdateSummary table, which can result in valid data not getting loaded even though the data does exist in the database. To avoid this, remove the corresponding rows from ResourceUpdateSummary for any computers seeing this problem.
  13. When it comes time to load the data into the database, the Notification Server Data Loader takes apart the NSE and inserts the data into the associated data classes contained in each NSI, or inventory fragment. This is done from the top down.
    Note: Data is loaded 'per resource', meaning that if a data class receives data, it will remove that resource's rows from the database before inserting the updated inventory (rows). This means that partial row updates are not supported, and any inventory that is now not being reported will get removed from the tables.
    Note: This also introduces an issue for Inventory sent from multiple users on the same machine. Only the last Inventory sent will show in the database. User-based items will only include the user who was logged on when Inventory last ran.
  14. The Inventory Data is now available in the database for Reports and Collections. Collections can tie computers to Tasks such as software upgrades, deployments, patch applications, and other similar tasks. The default reports can be run, or custom reports built to query specific inventory information captured.

Conclusion

If you are not receiving Inventory, the process can be followed step by step to find where the problem is occurring. This also helps to understand how data is captured, and especially how data is inserted into the database. When troubleshooting Inventory issues, the following locations should be checked:

  1. Client > UI > Options > Internal Tasks, do the tasks show up?
  2. Client > \Program Files\Altiris\eXpress\Inventory\NSI files present?
  3. Client > Error Logs > errors posting to the NS?
  4. Server > EvtQueue > Full of files?
  5. Server > EvtQueue > Bad > files piling up in sub folders that are Inventory NSEs?
  6. Server > Error Logs > File process errors "Unable to process file..." present?

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Jun 20, 2013 05:57 AM

Is this process walk through true for CMS7.0 andCMS7.1 as well?

Sep 05, 2011 06:36 AM

Is this walkthrough actual for NS 7.1? Are there significant differences?

Oct 15, 2010 08:32 AM

thanks

Sep 27, 2007 09:01 AM

In the NSF training there is a slide that shows some of this workflow as well. Can we post just that slide to this topic as well?
Jonathan

Sep 26, 2007 08:21 PM

Great work Joel, do you have a pdf or doc version as i'd love to share this with partners.
A

Related Entries and Links

No Related Resource entered.