How to purge CA Workload Automation (DE) audit files?
search cancel

How to purge CA Workload Automation (DE) audit files?

book

Article ID: 50445

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) Workload Automation Agent DSERIES- SERVER CA Workload Automation DE - System Agent (dSeries)

Issue/Introduction

CA Workload Automation (DE) audit files do not get purged or removed from the server. They have to be manually removed from the server.

Environment

Component: CA Workload Automation dSeries

Resolution

Here is a UNIX script that can be used to clear out auditlogs.
Copy and save this text as clear_auditlog.sh

#!/bin/bash
if [ -z "$1" ]; then
    echo "Usage: clear_auditlog.sh 10"
  exit 1
fi

##
#Change CAWA_PATH to match your server install path
##
CAWA_PATH=/opt/CA/WorkloadAutomation
FILE=$CAWA_PATH/LogFiles/auditlog*
find $FILE -type f -mtime +$1 -exec rm {} \;

#--EOF-

Before using the script, change the CAWA_PATH to match the path of your server installation. The script will require a command line argument to pass which relates to the age of the auditlogs.

E.g.: "./clear_auditlog.sh 10" would clear auditlogs that are older than 10 days.

It is highly recommend that clients DO NOT clear out the auditlogs, but instead move them somewhere else. Moving auditlogs to some other location will allow clients to have all of their auditlogs information in case of an audit