1. Home
  2. Usage Tracking
  3. Managing the Usage Tracking Data

Managing the Usage Tracking Data

The StayLinked Server is a Java Server application and uses a Java Database to record and contain the Usage Tracking data. The Usage Tracking database is embedded in the server and is fully encrypted and secured.

Usage Tracking Database Details

The Java Database that is used to record the Usage Tracking data is contained in the ‘../stay-linked/usage’ folder that resides on the StayLinked Server. The ‘usage’ folder and its contents are the database and the objects in this folder will be allocated while the StayLinked Server process is running. The ‘usage’ folder and its contents will not be able to be copied, modified, moved or deleted while the StayLinked Server process is running. In order to backup the Usage Tracking database, you must make a copy of the ‘usage’ folder and its contents while the StayLinked Server process is not running.

Usage Tracking Database Size and Growth

The contents of the Usage Tracking database are stored in the ‘../stay-linked/usage’ folder that resides on the StayLinked Server. The size and growth of the ‘usage’ folder will depend upon a number of variables:

  • The configuration of the Usage Tracking feature. The more options that are enabled for recording different information, the larger the database can grow.
  • The number of unique devices that connect to the StayLinked Server. If usage tracking is enabled, then at minimum there will be one single usage tracking record created for each unique device that connects to the server.
  • The number of sessions that are started and ended. If the usage tracking is configured to enable Session Tracking, then the database will increase in size as more sessions are started and ended.
  • The amount of Activity Tracking recorded. If the usage tracking is configured to enable Activity Tracking, then the frequency of activity being recorded will affect the size of the database.
  • The frequency of the Statistics Interval. If the usage tracking is configured to record Statistics to the database, then the database will grow faster if the Statistics Interval is shorter.
  • The amount of UserID Tracking recorded. If the usage tracking is configured to enable UserID Tracking, then the frequency of UserIDs being recorded will affect the size of the database.
  • The configuration of the Database Cleanup routine. The Activity Tracking Data Age before Export/Cleanup configuration and the ‘Cleanup Interval’ configuration will affect the size of the database.

The Usage Tracking Database Cleanup Routine

In order to manage the growth of the Usage Tracking database, the Database Cleanup routine can be configured to purge records from the database according to the Usage Tracking Configuration. The Database Cleanup routine will run according to the ‘Cleanup Interval’ that can be configured. Each time the Database Cleanup routine runs, the following steps will be performed.

  • The Usage Tracking Database Cleanup routine will wake up according to the configured ‘Cleanup Interval’ value, but the cleanup processing will only occur if Usage Tracking is enabled.
  • Session Tracking records will be collected based upon the ‘Session Tracking Data Age before Export/Cleanup’ setting. If configured for export, these old Session Tracking records will be written to an export file. Then, the collected records will be deleted from the Usage Tracking database.
  • Activity Tracking records will be collected based upon the ‘Activity Tracking Data Age before Export/Cleanup’ setting. If configured for export, these old Activity Tracking records will be written to an export file. Then, the collected records will be deleted from the Usage Tracking database.
  • UserID Tracking records will be collected based upon the ‘UserID Tracking Data Age before Export/Cleanup’ setting. If configured for export, these old UserID Tracking records will be written to an export file. Then, the collected records will be deleted from the Usage Tracking database.
  • The remaining tracking records will be counted and reported into the usage tracking log file.

After the process is completed, the Cleanup routine will sleep according to the ‘Cleanup Interval’ value.

The same cleanup procedure will be processed for the Statistics Tracking records, but the ‘Statistics Interval’ will control the frequency of the cleanup of statistics tracking records.

Resetting the Usage Tracking Database to Default

The Usage Tracking database can be reset to default. Resetting the database may be desirable if the ‘usage’ database folder grows to a size that is larger than desired. The ‘usage’ folder that contains the usage tracking database will grow dynamically as more tracking data is added. The Database Cleanup routine will delete data from the database, but the newly freed storage space will not be reclaimed by the file system. Any unused storage that is freed by the Database Cleanup routine will be reused for any new tracking data that is added. If you want to restore the ‘usage’ database folder to the original default size and recover all of the unused storage space, you will need to reset the usage tracking database. If you reset the usage tracking database, you will lose any data that had not already been cleaned-up by the Database Cleanup routine.

The process to reset the usage tracking database to default follows:

  1. End the StayLinked Server process.
  2. Delete, rename or move the ‘usage’ subfolder from under the parent ‘stay-linked’ folder.
  3. Verify that the ‘usage’ folder no longer exists as a subfolder under the parent ‘stay-linked’ folder.
  4. Restart the StayLinked Server process.
  5. During startup, the StayLinked Server will build a fresh ‘usage’ folder if it does not already exist.
Updated on March 26, 2021

Related Articles