Imanami Community

Join or create discussions about common issues and solutions.
Welcome to Imanami Community Sign in | Join | Help
in Search

INFO: PruneHistory.vbs V1.0.2 Script for keeping your log files clean

Last post 10-09-2007, 10:27 AM by Robin Soto. 0 replies.
Sort Posts: Previous Next
  •  10-09-2007, 10:27 AM 351

    INFO: PruneHistory.vbs V1.0.2 Script for keeping your log files clean

    <<THIS SCRIPT IS UNSUPPORTED>> 
    The attached script is used to prune the job run history from DTM.  DTM generates log files every time a job is processed.  When the DTM console launches it processes these files which can take time if you have a lot of history.  The attached script can be used to prune the history logs.  It can work in one of two ways: it can delete all the log files from all the jobs that are older than x number of days (-days switch) or it can keep the last x number of log files (-count switch).
     
    Additional features:
    - Can only be called from cscript (so you aren't message boxed to death!)
    - Gets job path from registry
    - Deletes only dtmreport and dtmlog files
     
    Usage: prunehistory.vbs --days|-d numberofdays
                   [--count|-c numberofhistory]
                   [--kill|-k]
                   [--verbose|-v]
                   [--help|-?]
    Note: Run this script from the computer where DTM 3.0 is installed
    Example 1: deletejobhistory -d 7
               Displays all log files and reports from job runs older than 7 days
    Example 2: deletejobhistory -d 7 -k
               Deletes all log files and reports from job runs older than 7 days
    Example 3: deletejobhistory -c 10
               Displays all log files and reports, except the most recent 10
    Example 4: deletejobhistory -c 10 -k
               Deletes all log files and reports, except the most recent 10


    <<THIS SCRIPT IS UNSUPPORTED>> 

    Filed under:
View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems