Offload logs, usage data, and statistics
Note: Offloading is only available for the on-premises Qt License Server operating in offline mode.
Qt License Server stores logs, usage data, and statistics in a database. Depending on the usage rate and license model, the database file size may grow fast.
You can perform a data offload (logs, usage data, and statistics) either manually or by scheduling tasks. The data is stored in comma-separated values (CSV) (.csv
) format in a data_offload
folder. Logs, usage data, and statistics are stored separately.
Once data is offloaded into .cvs files, it is permanently deleted from the database to reduce its size. After offloading, the data can no longer be exported.
Offload data from the command line
To offload logs, usage data, and statistics from the Qt License Server running at the specified URL using qt-license-server, enter:
./qt-license-server data-offload --url <URL>
.\qt-license-server.exe data-offload --url <URL>
Schedule data offload tasks
Before starting Qt License Server, edit the Qt License Server configuration to turn on automatic data offload, as well as to set the export interval and start time.
To turn on automatic data offload, set the QLS_AUTO_DATA_OFFLOAD
environment variable to yes
.
Set the data offload interval to one of the following values:
- Daily
- Weekly, on the first day of the week
- Monthly, on the first day of the month
Set the hour to start the data offload using the 24-hour clock.
To edit the Qt License Server configuration:
In the qt-license-server.service file, set:
Environment="QLS_AUTO_DATA_OFFLOAD=yes" Environment="QLS_DATA_OFFLOAD_INTERVAL=<daily|weekly|monthly>" Environment="QLS_DATA_OFFLOAD_START_HOUR=<00|..|24>" Environment="QLS_DATA_OFFLOAD_FILE_PATH=<filePath>" Environment="QLS_SYSTEM_LOG_PATH=<filePath>" Environment="QLS_SYSTEM_LOG_FILE_SIZE=<fileSize>"
In the qt-service.xml file, set:
<env name="QLS_AUTO_DATA_OFFLOAD" value="yes" /> <env name="QLS_DATA_OFFLOAD_INTERVAL" value="<daily|weekly|monthly>" /> <env name="QLS_DATA_OFFLOAD_START_HOUR" value="<00|..|24>" /> <env name="QLS_DATA_OFFLOAD_FILE_PATH" value="<filePath>" /> <env name="QLS_SYSTEM_LOG_PATH" value="<filePath>" /> <env name="QLS_SYSTEM_LOG_FILE_SIZE" value="<fileSize>" />
Data offload task example
To schedule automatic weekly data offload to start at 3 AM on the first day of the week, edit the Qt License Server configuration. The logs, usage data, and statistics are stored in the folder that you set as the value of the QLS_DATA_OFFLOAD_FILE_PATH
environment variable. Set the maximum log file size to 20MB (the default value), as the value of QLS_SYSTEM_LOG_FILE_SIZE
.
In the qt-license-server.service file, set:
Environment="QLS_AUTO_DATA_OFFLOAD=yes" Environment="QLS_DATA_OFFLOAD_INTERVAL=weekly" Environment="QLS_DATA_OFFLOAD_START_HOUR=03" Environment="QLS_DATA_OFFLOAD_FILE_PATH=/opt/qt-license-server/" Environment="QLS_SYSTEM_LOG_PATH=/opt/qt-license-server/" Environment="QLS_SYSTEM_LOG_FILE_SIZE=20"
In the qt-service.xml file, set:
<env name="QLS_AUTO_DATA_OFFLOAD" value="yes" /> <env name="QLS_DATA_OFFLOAD_INTERVAL" value="weekly" /> <env name="QLS_DATA_OFFLOAD_START_HOUR" value="03" /> <env name="QLS_DATA_OFFLOAD_FILE_PATH" value="C:\data_offload" /> <env name="QLS_SYSTEM_LOG_PATH" value="C:\Users\a_user\Documents" /> <env name="QLS_SYSTEM_LOG_FILE_SIZE" value="20" />
See also Export logs, Export statistics, Qt License Server configuration, and Qt License Server command-line interface.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.