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
- Windows
- Unix
-
Open a command prompt with Administrator level privileges.
-
Go to the bin directory, which is by default in
C:\Program Files\OpeniT\Core\bin, run the command:Command Syntaxcd $BIN_DIRExamplecd C:\Program Files\OpeniT\Core\bin -
Once in the directory, activate the periodic cleanup of the old database based on the cleanup settings, run the command:
Command Syntaxopenit_oconfinit -u "core_filecleaner.root.scheduler.jobs.filecleaner.general.active=true"
-
Go to the bin directory, which is by default in
/opt/openit/bin, run the command:Command Syntaxcd $BIN_DIRExamplecd /opt/openit/bin -
Once in the directory, activate the periodic cleanup of the old database based on the cleanup settings, run the command:
Command Syntaxopenit_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.
- Windows
- Unix
-
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\resultsdirective on theopenit.cfgconfiguration 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
*.tempBy 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\httpddirective on theopenit.cfgconfiguration 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\simpleReportsdirective on theopenit.cfgconfiguration file.The filename of the reports within follow these glob formats:
*top_0_*.repBy 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\tempdirective on theopenit.cfgconfiguration 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\Logdirective on theopenit.cfgconfiguration file and the filename of the reports within follow these glob formats:*.logBy default, files that follow the specified glob format are deleted if they are not modified after the value specified by the
$DebugCleanupDaysdirective on theopenit.cfgconfiguration 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_statusdirective on theopenit.cfgconfiguration 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_AGEdirective on theopenit.cfgconfiguration file.
-
-
Remove expired clients in the
client_info.jsonfile -
Performs log rotation on the
secured_file_transfer.logfile 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.gzfiles inC:\ProgramData\OpeniT\Data\temp\LicPollthat are more than 1 year old.
-
Removes old logs and reports saved in the following directories:
-
{Trash} and {Temporary} directories on the server found in the directory specified in the
/data/resultsdirective on theopenit.cfgconfiguration 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
*.tempBy 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
/var/opt/openit/etc/httpddirective on theopenit.cfgconfiguration 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
/data/simpleReportsdirective on theopenit.cfgconfiguration file.The filename of the reports within follow these glob formats:
*top_0_*.repBy default, files that follow the specified glob format are deleted if they are not accessed after 8 hours.
-
Temp directory specified in the
/var/opt/openit/tempdirective on theopenit.cfgconfiguration 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
/var/opt/openit/debugdirective on theopenit.cfgconfiguration file and the filename of the reports within follow these glob formats:*.logBy default, files that follow the specified glob format are deleted if they are not modified after the value specified by the
$DebugCleanupDaysdirective on theopenit.cfgconfiguration file, which is set to 14 days by default. -
license_status directory. This folder is in the directory specified in the
/data/license_statusdirective on theopenit.cfgconfiguration 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_AGEdirective on theopenit.cfgconfiguration file.
-
-
Remove expired clients in the
client_info.jsonfile -
Performs log rotation on the
secured_file_transfer.logfile 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.gzfiles in/data/temp/LicPollthat are more than 1 year old.
FileCleaner Binary Configuration
- Windows
- Unix
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:
| Parameter | Descriptions |
|---|---|
--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-clients | Use 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-log | Use 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. |
The openit_filecleaner binary is automatically run based on core_filecleaner.oconf found in /var/opt/openit/etc/scheduler.
Run this binary using any of the following parameters:
| Parameter | Descriptions |
|---|---|
--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-clients | Use 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-log | Use 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. |