Synchronize hardware inventory

book

Article ID: 10845

calendar_today

Updated On:

Products

CA Automation Suite for Data Centers - Configuration Automation CA Client Automation - Asset Management CA Client Automation - IT Client Manager CA Client Automation CA Client Automation - Remote Control CA Client Automation - Asset Intelligence CA Client Automation - Desktop Migration Manager CA Client Automation - Patch Manager

Issue/Introduction

Sometimes it could be necessary to re-synchronize the Hardware Inventory if a problem has occurred during transfer or collect of previous Hardware inventory files. There might be a difference between the hardware inventory displayed in the DSM Explorer and the hardware inventory collected by the Agent machine.

DSM Agent is sending only delta files between hardware inventories. So if a problem occurs during collect of full or delta files, the hardware inventory displayed in DSM Explorer may be not complete.

 

 



Environment

Release: UASIT.99000-12.9-Asset Intelligence
Component:

Resolution

There are 3 possible solutions:

____________________________________________________________________________________________________________________

Solution 1:

From DSM explorer, right click on the machine and select "Asset Jobs - Activate Job Check..."

Select "Rescan Hardware Inventory" and "Re-collect"

<Please see attached file for image>

src="/servlet/servlet.FileDownload?file=0150c000004AJbSAAW" alt="Capture.JPG" width="358" height="413">

 

Pros : Very easy and quick method to re-synchronize only one machine or a few machines.

Cons : Not recommended to re-synchronize a lot of machines with this solution. Could not work if Scalability Server could not reach the target machine.

 

____________________________________________________________________________________________________________________

Solution 2:

 Execute following command on the machine :

caf start amagent args -rescan_inventory -collect

 

This command could be executed on the machine manually, via a SD package or via an external tool.

 

Pros : Very easy and quick method to re-synchronize only one machine or a few machines.

Cons : Not very easy to re-synchronize a lot of machines with this solution.

 

____________________________________________________________________________________________________________________

Solution 3:

Another solution is to delete the hardware inventory files located in BAK (Windows) or backup (Unix/Linux) directory on agent machines. So no delta will be done and a full hardware inventory file will be sent to the Scalability Server.

It is possible to force the sending of a FULL hardware inventory by deleting the hardware inventory files located in backup directory on agent machines. This could be done with an Asset job Script.

    1. In DSM Explorer go to Jobs/Asset Jobs. 

      Right Click on "My Asset Jobs" and select New in popup menu. 

      The "New Job Wizard" dialog Box appears. Select "Script" in Job Type listbox :

      <Please see attached file for image>

      style="" src="https://search.ca.com/assets/SiteAssets/TEC594915_Embeded/594915c.gif" alt="Figure 3" width="650" height="487" border="0"> 


    2. Click Next. Give a name to the job. In this example - "Synchronize Hardware Inventory". 

      <Please see attached file for image>

      src="/servlet/servlet.FileDownload?file=0150c000004AJbTAAW" alt="Capture2.JPG" width="498" height="558">



    3. Click NEXT

      Enter following script : 

      DIM filename AS STRING
      DIM iHandle AS INTEGER
      DIM path AS STRING
      IF UCase(Left(EnvGetString("OS"), 7)) = UCase("Windows") THEN
         Path=ComputerPath+"\BAK\*.inv"
         iHandle=FindFirstFile(path,filename)
         IF (iHandle<>0) THEN
            REPEAT
               DeleteFile(ComputerPath+"\BAK\"+filename)
            UNTIL NOT(FindNextFile(iHandle, fileName))
            FindClose(iHandle)
         END IF
         Path=ComputerPath+"\BAK\*.mnv"
         iHandle=FindFirstFile(path,filename)
         IF (iHandle<>0) THEN
            REPEAT
               DeleteFile(ComputerPath+"\BAK\"+filename)
            UNTIL NOT(FindNextFile(iHandle, fileName))
            FindClose(iHandle)
         END IF
      ELSE 
         DeleteFile(ComputerPath+"/../backup/complete.bak")
      ENDIF




      <Please see attached file for image>

      src="/servlet/servlet.FileDownload?file=0150c000004AJbUAAW" alt="Capture3.JPG">



    4. Click Next. Click on "Set Scheduling" button.

      In Tab Scheduling, select "Run Only Once".

      In Tab Miscellaneous, check "This job is allowed to run unattended"


      <Please see attached file for image>

      style="" src="/servlet/servlet.FileDownload?file=0150c000004AJbUAAW" alt="Capture3.JPG" width="424" height="475">



    5. Click OK and Finish.

    6. Drag & Drop this job to "All Computers" group or the computer group with machines you want to re-synchronize.



____________________________________________________________________________________________________________________

Attachments

1558701109742000010845_sktwi1f5rjvs16pc6.jpeg get_app
1558701108035000010845_sktwi1f5rjvs16pc5.jpeg get_app
1558701106175000010845_sktwi1f5rjvs16pc4.jpeg get_app
1558701104385000010845_sktwi1f5rjvs16pc3.gif get_app
1558701102345000010845_sktwi1f5rjvs16pc2.jpeg get_app