Skip to main content
Version: 10.2

Configuring Open iT FileCleaner

The Open iT FileCleaner prevents the accumulation of old and outdated files in Open iT installations, ensuring less clutter on the Open iT environment.

Activating FileCleaner

  1. Open a command prompt with Administrator level privileges.

  2. Go to the bin directory, which is by default in C:\Program Files\OpeniT\Core\bin, run the command:

    Command Syntax
    cd $BIN_DIR
    Example
    cd C:\Program Files\OpeniT\Core\bin
  3. Once in the directory, activate the periodic cleanup of the old database based on the cleanup settings, run the command:

    Command Syntax
    openit_oconfinit -u "core_filecleaner.root.scheduler.jobs.filecleaner.general.active=true"

FileCleaner Functions

FileCleaner helps maintain disk space and performance by removing outdated logs, temp files, expired reports, and inactive client entries. This guide will walk you through which directories and file types are affected, the cleanup conditions, and how to configure the directives in the openit.cfg file.

  • Removes old logs and reports saved in the following directories:

    • {Trash} and {Temporary} directories on the server found in the directory specified in the C:\ProgramData\OpeniT\Data\openit_html_data\results directive on the openit.cfg configuration file.

      The reports within follow these glob formats:

      Periodic Reports:
      top_*_*_*.csv, top_*_*_*.vbs, top_*_*_*.rep, top_*_*_*.seek,
      top_*_*_*.data, top_*_*_*.desc, top_*_*_*.ps, top_*_*_*.conf, top_*_*_*.conf.shtml,
      top_*_*_*.pres, top_*_*_*.shtml, top_*_*_*.json, top_*_*_*.sel, top_*_*_*.txt


      Instant Reports:
      top_0_*.csv, top_0_*.vbs, top_0_*.rep, top_0_*.seek, top_0_*.data,
      top_0_*.desc, top_0_*.ps, top_0_*.conf, top_0_*.conf.shtml, top_0_*.pres, top_0_*.shtml,
      top_0_*.json, top_0_*.sel, top_0_*.txt


      Temporary Files
      *.temp

      By default, periodic and instant reports that are not modified for more than a day are deleted; and, temporary files that are not accessed for more than a day are deleted.

    • httpd directory specified in the C:\Program Files\OpeniT\Core\Configuration\httpd directive on the openit.cfg configuration file.

      The filename of the reports within follow these glob formats:

      max-\*

      By default, files that follow the specified glob format are deleted if they are not accessed after 15 days.

    • SimpleReports directory specified in the C:\ProgramData\OpeniT\Data\openit_html_data\simpleReports directive on the openit.cfg configuration file.

      The filename of the reports within follow these glob formats:

      *top_0_*.rep

      By default, files that follow the specified glob format are deleted if they are not accessed after 8 hours.

    • Temp directory specified in the C:\Program Files\OpeniT\Core\Log\temp directive on the openit.cfg configuration file.

      The filename of the reports within follow these glob formats:

      *.temp, flist*, *.lock, cgisess_*
      • *temp - files that follow this glob format are deleted if not modified after seven days

      • flist* - files that follow this glob format are deleted if they are not accessed after two days

      • *.lock - files that follow this glob format are deleted if they are not accessed after two days

      • cgisess_* - files that follow this glob format are deleted if they are not modified after 14 days

    • Log directory. This folder is in the directory specified in the C:\Program Files\OpeniT\Core\Log directive on the openit.cfg configuration file and the filename of the reports within follow these glob formats:

      *.log

      By default, files that follow the specified glob format are deleted if they are not modified after the value specified by the $DebugCleanupDays directive on the openit.cfg configuration file, which is set to 14 days by default.

    • license_status directory. This folder is in the directory specified in the C:\ProgramData\OpeniT\Data\license_status directive on the openit.cfg configuration file and the filename of the reports within follow these glob formats:

      *

      By default, files that follow the specified glob format are deleted if they are not modified after the value specified by the $LICENSE_STATUS_MAX_AGE directive on the openit.cfg configuration file.

  • Remove expired clients in the client_info.json file

  • Performs log rotation on the secured_file_transfer.log file once it reaches a specified size threshold. Once the 10MB threshold is reached, the current log file is renamed by appending the date to its name and then creating a new log file. This prevents the creation of bulky log files.

  • Removes licpollcomplete.gz files in C:\ProgramData\OpeniT\Data\temp\LicPoll that are more than 1 year old.

FileCleaner Binary Configuration

The openit_filecleaner binary is automatically run based on core_filecleaner.oconf found in C:\Program Files\OpeniT\Core\Configuration\scheduler.

Run this binary using any of the following parameters:

ParameterDescriptions
--licpollcomplete-max-days <max_age> Use this to specify the maximum allowed age for licpollcomplete.gz files, where:
<max_age> - is the number of days before the file is removed.
--remove-expired-clientsUse this to remove expired clients in the client_info.json file . Any client unresponsive for the amount of days specified in the CLIENT_INFO_MAX_DAYS directive in the openit.cfg file are considered expired.
--rotate-secured-file-logUse this to initiate log file rotation on the secured_file_transfer.log file.
--remove-outdated-files <date_range>Use this to remove reports within the age threshold or date range specified by <date_range>.
Note: Age thresholds follow the Open iT format (i.e., PT<number>H for hours or P<number>D/M/Y for date, month, or year).
Date ranges follow this format: Year-Month-Day Year-Month-Day, where the dates are separated by a space (e.g., 2019-01-01 2019-01-10).
--period <ARGUMENT>Use this to initiate execution of all actions listed, where: <ARGUMENT> can either specify the age threshold for files to delete or a date range wherein any file within the range is deleted. The <ARGUMENT> format follows the same format used by --remove-outdated-files.
Parameters for Filecleaner Binary Configuration