Floating license server setup

Managing access to floating licenses

Table of content
  1. High availability considerations
  2. Autostart (Windows)
  3. Autostart (Linux)
  4. Backup
  5. License session logging
  6. Database import and export

This page describes the setup of the floating license server - typically an IT system administrator.

High availability considerations

The server provides software licenses and is typically a mission-critical application, which should be available 24/7.

To ensure uninterrupted service and disaster recovery, the following measures can and should be taken:

The subsequent sub-sections describe how the above measures can be implemented.

Autostart (Windows)

On Windows, this can be achieved by creating a task in the Task Scheduler that starts the server. The rest of this subsection describes how to create such a task.

  1. Press the Windows key (🪟), and type Task Scheduler. Click on the Taks Scheduler icon to start it. Find Task Scheduler in the Windows Start menu

  2. Select Create basic task... in the Task Scheduler's Action menu.

    Create basic task

    This starts a task creation "wizard" - a dialog box that subdivides the task creation into several steps. You are several short steps away from completion. Press the Next > button after completing each of wizard's steps.

  3. Name the task, and describe it in more detail if you want. Name and describe the task

  4. Choose When the computer starts as the trigger. Choose the trigger

  5. Use Start a program as the desired action. Choose the action

  6. Use the Browse... button to navigate to the qlm_server.exe and select it as the program to run. Choose the executable

    Also, enter the directory where you want your data to be stored into the Start in (optional) box. Make sure that that directory is writable.

  7. Finish the wizard.

That sets the QuidLM floating license server to start automatically during the Windows boot process and thus protects the service from long interruptions if the computer is restarted.

Use Create task... action of Task Scheduler instead of Create basic task... if you want more control over how this service is run. For example, you can select which user account is used for running this service.

Autostart (Linux)

The systemd facility is a part of typical Linux distribution. It is a system and service manager and is used to bootstrap the user space processes of the operating system. Create the QuidLM.service file in the /etc/systemd/system directory. For example,

sudo cat >/etc/systemd/system/QuidLM.service <<EOF
[Unit]
Description=Quid License Manager
After=network.target

[Service]
Type=simple
ExecStart=/path/to/qlm_server
Environment="QLM_DB_PATH=/path/to/writable/directory"

[Install]
WantedBy=multi-user.target
EOF

Replace /path/to/qlm_server above with the full path of qlm_server application on your computer. Also, specify the writable directory where you would like to keep you database files in the QLM_DB_PATH environment variable defined in the above snippet.

Start the QuidLM service and register it to start automatically:

sudo chmod 644 /etc/systemd/system/QuidLM.service

# start the QuidLM server
sudo systemctl start QuidLM

# mark the QuidLM service for autostart when the system boots
sudo systemctl enable QuidLM

Other systemd commands you may use for operating this service are

sudo systemctl status QuidLM   # is the service running?
sudo systemctl stop QuidLM     # stop the service
sudo systemctl restart QuidLM  # restart the service
sudo systemctl disable QuidLM  # do not auto-start at computer boot up

Backup

The server stores its data in the directory specified by the QLM_DB_PATH environment variable. If the environment variable is not set, the current working directory is used. Regularly backup that directory for recovery from power interruptions, hardware failures, and other disasters.

License session logging

QuidLM allows to keep license session logs. The logs record each license use: who and when checked out the license, for how long, and on which computer. This functionality is not enabled by default, as the server also maintains license usage statistics - and that is typically of more interest than the timestamp and destination of each license checkout.

To enable the license session logging, set the QLM_LOG_SESSIONS environment variable to an integer - the number of days to keep the session logs. When the environment variable is not defined, the session logging is disabled.

The log files are recorded in the session.db sub-directory of the directory specified by the QLM_DB_PATH environment variable. If QLM_DB_PATH is not defined, the current working directory is used.

Database import and export

QuidLM servers store data in the subdirectories of the directory specified by the QLM_DB_PATH environment variable. If the environment variable is not set, the current working directory is used.

You will recognize a database directory by its .mdb extension. Notable database directories are:

The directories contain the data in the LMDB format. LMDB is a key-value store with excellent performance, but its storage format is not ubiquitous. In addition, its binary file format relies on the memory representation of the machine, which means a database file cannot be directly moved between computers with different architectures. Specifically, the databases created on big-endian platforms cannot be read on the little-endian ones and vice versa. Similarly, 32-bit and 64-bit systems are incompatible. To facilitate import and export of data from its databases, QuidLM is shipped with lmdb2json utility. The utility converts LMDB databases to and from JSON format, which is prolific and human-readable.

To run the utility, provide it with two file paths as command line arguments. One of the paths should have the .json extension and the other one .mdb. The first argument must be an existing file or directory, and the data in it will be converted and written into the path specified by the other argument. For example,

lmdb2json activation.mdb activation.json
lmdb2json order.json order.mdb