Guralp Systems Limited
MAN-EAM-1100 - CD1.1 Tools for Platinum

Chapter 9. Frame database files

The CD1.1 multiplexor stores subframes on disk in a simple database file, indexed by time. One database file is created per day.

By default, these database files are stored under /var/lib, but some Platinum systems have additional flash storage mounted under /media/flash_module, so it may be advantageous (where extra capacity is required) to reconfigure the multiplexor to store its database files in a subdirectory in this location (see the Database directory field in Section 3.1 and the discussion of optional flash memory in Section 14).

The first section of the database file contains 8640 pointers (one for each possible frame start time within a 24-hour period), which allows the multiplexor to quickly jump to the first subframe received for a given time-stamp.

When new subframes are received, they are stored into the database file, creating a new one if necessary. When the data frame transmission period timer expires, all subframes for a given time-stamp are read back from the database file and transmitted to each connected output module. In addition, any output module can request all subframes for a given time-stamp, which allows the implementation of back-fill.

9.1 Managing database files

Caution: If left unattended, the database files will continue to grow as subframes are received until the system runs out of secondary storage (flash or hard disk space), casing the system to crash. Because of this: (a) you should ensure that you have sufficient space available to store the expected amount of data; and (b) you should configure a directory cleaner to remove unwanted files from this directory (see Section 9.1 for more details).

Files are named by ordinal day (YYYY-DDD in ISO8601 notation).

The files can either be manually managed, or an automatic task to periodically prune old files can be created. To do this, in the web interface, select “Configuration -> Tasks” from the left-hand menu or from the command line, run

gconfig

and select “Routine tasks”.

Select “Directory cleaner” and then “Setup cleaning in new directory”.

The resulting form allows you to configure all options of the directory cleaning task. Each cleaner handles a single directory so it is necessary to create multiple cleaner instances for all but the simplest applications.

The directory cleaner configuration screen looks like this:

Enter the full path to the database directory (e.g. /var/lib/data-mux-cd11.0 or /media/flash_module/data-mux-cd11.0) into the Directory field.

It is possible to limit the files either by size or by number (or by both).

Scanning occurs once an hour and, if there are more files or space used than the configured maximum, some will be removed. Using Lexical File sorting ensures the oldest data will be removed first (see the configuration help for more information).

9.2 Examining database files

A command line program, cd11-timedb-tool, can be used to examine the database files - see Section 10.2.3 for details.