AutoSys Workload Automation

  • 1.  CA WA DE Series - Purge Cli log files and audit log files

    Posted Nov 18, 2016 05:10 PM

    Hi Experts,

     

    We have a requirement to purge cli log files and audit log files. Could you please advise as to how to purge these files.

     

    Regards,

    Sudhir Goel



  • 2.  Re: CA WA DE Series - Purge Cli log files and audit log files
    Best Answer

    Broadcom Employee
    Posted Nov 20, 2016 05:33 PM

    Hi Sudhir,

     

    You can clear server log files by issuing the PURGELOG command in the CLI or scheduling the HOUSEKEEPING Application packaged with CA WA Desktop Client.

     

    Please find more information regarding archiving and clearing the logs in the links below:

    Archiving and Clearing Server Log Files - CA Workload Automation DE - 11.3.3 - CA Technologies Documentation 

    purgecompletedjobs Command—Clear the Server Completed Jobs Repository - CA Workload Automation DE - 11.3.3 - CA Technolo… 

     

    Hope this helps!

     

     

    Regards,

    Avinash



  • 3.  Re: CA WA DE Series - Purge Cli log files and audit log files

    Posted Nov 21, 2016 04:15 AM

    Hi Sudhir,

     

    I noticed your question and remembered that we worked on this question already.

    Here is what I implemented on my windows environment.
     

    I created a file 'cleanup_clilog.bat' (based on cleanup.bat):

     

    '@echo OFF
    rem %~dp0 is expanded pathname of the current script under NT
    set CAWA_HOME=%~dp0..

    if {"%1"} == {"--help"} (
    echo "The cleanup_ccilog functionality will purge CLI log files"
    echo "Usage: cleanup_ccilog.bat <number of days older files need to be deleted>"
    goto :END
    )

    if {%1} == {} (
    echo "Please enter the argument - <number of days older files need to be deleted>"
    goto :END
    )

    forfiles -p "%CAWA_HOME%\logs" -s -m Clilog.* -d -%1 -c "cmd /c del @path"

    :END

     

    I added in my housekeeping application a job called CLEANUP_CLILOGS (copied job CLEANUP_TRACELOGS) and modified it to submit 'cleanup_clilog.bat'.

     

    Regards,

    Eric