search cancel

Script to clean the folder SD\TMP\activate on NOS LESS SD Agent


Article ID: 228069


Updated On:


CA Client Automation - IT Client Manager CA Client Automation CA Client Automation - Software Delivery


On NOS-Less SD Agent if there was an unexpected problem during the NOSLess download of a SD Package, some files could remain in folder C:\Program Files (x86)\CA\DSM\SD\TMP\activate on the SD Agent.


Example :

On this agent, there are 2 directories .itm, 1 file .hsh and 1 file .zip in directory SD\TMP\activate

How to clean this directory on the Agents ?


Client Automation - All Versions.


See Attached DMS script clean_sd_tmp.dms
An Asset Job of type script could be created for it :
1- In DSM GUI go under Jobs/Asset Jobs/My Asset Job
Right click on it and select New...
2- In Job type put Script :
3- Give a name to the job job (ex: Clean SD TEMP)
Click on Next Button.
4- In text field, Copy/Paste the content of file clean_sd_tmp.dms
Click on Next

5- Click on "Set Scheduling".
You could for example choose "Run only once a week" in Conditions tab
In Miscellaneous tab, check "This job is allowed to run unattended".
Click Finish to terminate the job creation.
6- Do a copy/Paste of the job onto the machines or group of machines which should execute this script.
Remarks :
- This script is working only on Agents. Not on Domains or Scalability Servers
The script is checking this and exits if computer has Scalability server or Domain role.
- This script generates a log C:\Program Files (x86)\CA\DSM\logs\clean_sd_tmp.log

Additional Information

Once executed the status of job displays a comment like :
NASD:0|1 zip:x/y hsh:x/y itm:x/y
SD TEMP is clean
NASD:0|1 indicates if Agent is a collaborating Agent for "Neighbor Aware Software Distribution". 0=Not collaborating Agent.  -  1=collaborating Agent
zip:x/y indicates that x .zip files have been deleted and y .zip files have been found
hsh:x/y indicates that x .hsh files have been deleted and y .hsh files have been found
itm:x/y indicates that x .itm directories have been deleted and y .itm directories have been found
In above example the status Text is :
NASD:0 zip:1/1 hsh:1/1 itm:2/2
NASD=0 means that Agent is not a collaborating Agent for "Neighbor Aware Software Distribution"
zip: 1/1 means that 1 zip has been found and 1 zip file has been deleted
hsh: 1/1 means that 1 hsh file has been found and 1 hsh file has been deleted
itm: 2/2 means that 2 directories .itm have been found and 2 directories .itm have been deleted


1637688486299__clean_sd_tmp.dms get_app