Jump to: navigation, search

Cleanup Snapshot Data

Pulse Collector may generate large amounts of layout data snapshot files each day. These files are usually necessary for a relatively short time period, like 24 hours, and can be safely removed afterwards.

Important
For the troubleshooting purposes Genesys strongly recommends to keep Pulse Collector outputs for at least recent 2-3 days.

Genesys provides a filesystem cleanup utility (cleanup tool), to simplify this task in data intensive environments. The cleanup tool is included within the Pulse Collector installation for all supported operating systems. Unlike a simple file removal by created date, this cleanup tool analyzes layout snapshot files required for Pulse and removes only those that were not in use for the last 24 hours.

Deployment

After installing Pulse Collector, you can find the executable file called cleanuptool in Linux and cleanuptool.exe in Windows, located in the same folder that contains the Pulse Collector executable. Generally, this is a console application, which accepts some command-line options and requires the configuration file.

Genesys recommends you run this cleanup tool regularly using standard task scheduling software available within your operating system: Cron for Linux or Windows Task Scheduler for Windows. The cleanup tool must be run under user account that has permissions to read, write, and remove files and directories on the filesystem where Pulse Collector writes the layout data snapshots.

Define your scheduling period based on the data generation intensity and your target filesystem capacity. Genesys recommends that you run the cleanup tool every hour.

Command-line options

The cleanup tool supports number of command-line options:

Usage: cleanuptool [options] <path> ...

Options:

-c --config-file <file-name> Specify new configuration file to us (default is './cleanuptool.ini', if present)
-p --preserve-last-file Always preserve last file, even outdated
-l --follow-symlinks Follow symbolic links
-m --cross-mountpoints  Cross filesystem mount point boundaries
-s --stop-on-error   Stop processing if error occurs
-d --dry-run   Do not perform actual file removals
-V --verbose  Show verbose messages
-VV --extra-verbose  Show extra verbose messages
-q --quiet   Do not show verbose messages
-v --version  Show version
-h --help Show help message

  

Configuration File

As stated above, the filesystem cleanup tool requires a configuration file, which defines the time periods for which files should be preserved. If the timestamp of file matches the time period, the file is preserved. Otherwise, the file is deleted.

You can also simulate full processing by running the cleanup tool in the “dry run” mode, when it just collects the information about the files to be deleted, but does not actually delete them.

The configuration file has the standard INI-file format: It contains a few sections and allows comment lines that start with semicolon. A sample configuration file is in the Pulse Collector installation directory, it is called cleanuptool.ini.sample.

General Section

The general section has two parameters:

  • active-intervals—(required) lists names of active intervals. There is no default value.
  • measure—(optional) defines time measurement unit for interval points. Valid values: m, min, minutes—minutes, s, sec, seconds—seconds. The default value is minutes.

Intervals Section

The intervals section defines set of intervals. Each interval is defined as separate INI file parameter under this section, in the format NAME=VALUE. You can define multiple intervals and still use only the ones you need. You can list the names of the ones you want to use in the active-intervals option in the general section.

VALUE is parameter definition string which format is defined as follows:

The form of interval definition is following:

[ALIGNMENT]<BEGIN>-<END>[:<GRANULARITY]>

Detailed description of elements:

  • [ALIGNMENT]—Optional, alignment of granulation points. By default intervals are aligned to granularity number. Possible values: 'A' - aligned, U - unaligned.
    • <BEGIN>&mdashRequired, beginning of the interval, included to interval.
    • <END>&mdashRequired, end of the interval, not included to interval. 
  • [GRANULARITY]—Optional, granularity of the interval. Affects the points of granulation, which determine the files to be preserved. The default value is 0.
    Note: A zero value of granularity means that all files matching to the interval are preserved.

Examples  

        

0-1 Preserves all files with modification time difference in range between 0 and 1 measure points.
10-20:1 In the interval from 10 to 20 measure points, preserves the files near granulation points standing each 1 measure point, aligned to granularity (according to default behavior).
U10-20:3 In the interval from 10 to 20 measure points preserves the files near granulation points standing each 3 measure points, unaligned to granularity. Points are 10, 13, 16, 19.
A20-60:7 In the interval from 20 to 60 measure points preserves the files near granulation points standing each 7 measure points, aligned to granularity. Points are 21, 28, 35, 42, 49, 56.
This page was last edited on January 26, 2017, at 14:35.
Comments or questions about this documentation? Contact us for support!