Inventory runs for a long time due to the File scan reporting a lot of instances of same files
Last Updated December 09, 2016
Some Windows Operating System folders, more specifically for non-English versions (German, Italian, etc.), contain junctions. When opened, the path to the file may show multiple instances of the same folder when seen at the command-line level. Windows Explorer does not show the duplicate folders. You can see them if running a "dir /a" command.
When an Inventory policy is executed and runs the File scan, it reports the duplicate directories wherever one of theses folders is opened, so the NSE will contain a lot of records of same file located in different folders. Here is an example from an Italian Operating System:
There are two issues that occur because of the way the File scan handles this behavior.
The Inventory Task will take an inordinate amount of time to complete. Inventory finishes successfully, but it can cause performance issues due to large amount of disk I/O operations.
The resulting File inventory NSE file will contain a lot of unnecessary records for the same file.
While no errors or warnings will be thrown, the Agent logs will be flooded with informational and/or trace level records. They will look similar to the screen shot below taken from Windows 7 SP1 x64 client with a German OS. Files discovered in junction folders will then be stored in the NSE file to be sent back to server.
If you are running a previous version than the above and need to resolve the issue without upgrading, the current workaround is to exclude these directories from scanning.
In the Inventory Policy, click the Advanced button.
Click on the File Properties Scan Settings tab.
Under the Windows Folders section click Exclude folder.
Add the offending folder. Example below is for German OS and directory Application Data - Anwendungsdaten.
Click OK to save the new rule(s).
Click Save to save the changes to the policy.
Note: This should be done to each policy that contains file scanning.
Note: Beyond folder exclusions you may need to follow the steps from TECH231139 to clean up records from database. A snippet below details this:
HKLM_SOFTWARE\Altiris\Altiris Agent\Inventory\FileInventoryFullUpdate key set to 1 will force File inventory to be sent without PartialUpdate flag. This will ensure that the next inventory will delete records from the database tables for the same files reported from these junction folders with different depths. After Inventory runs the value will be switched back to 0.
Subscribing will provide email updates when this Article is updated. Login is required to Subscribe