search cancel

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

book

Article ID: 228069

calendar_today

Updated On:

Products

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

Issue/Introduction

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 ?

Environment

Client Automation - All Versions.

Resolution

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 :
 
https://api-broadcom-ca.wolkenservicedesk.com/attachment/get_attachment_content?uniqueFileId=8ufR++rsNNOptc7JKvwpww==
 
 
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
 
https://api-broadcom-ca.wolkenservicedesk.com/attachment/get_attachment_content?uniqueFileId=7aqwzx/V0AbYEevI41oPqw==
 
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".
 
https://api-broadcom-ca.wolkenservicedesk.com/attachment/get_attachment_content?uniqueFileId=o6qdsQK25JXx0YzrjwjK/g==
 
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
or
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
 
 
https://api-broadcom-ca.wolkenservicedesk.com/attachment/get_attachment_content?uniqueFileId=WvJvRb4iLUCLZIBW/aXMpA==
 
 
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
 

Attachments

1637688486299__clean_sd_tmp.dms get_app