9 Additional features

Here we describe some frequently requested additional features available for floating licenses.

9.1 Options file

FLEXlm allows some customizations by the user through an options file. An options file (say, mosek.opt) can be attached to the license by editing the VENDOR line in the license file as follows:


The options file is a text file with one option per line. The full list of options can be found in the section Managing the options file of the FLEXnet license administration guide . Some useful ones are:

  • MAX: restricts the number of tokens one user/group can check out. For example, to restrict user bill to at most 2 tokens of each type PTS and PTON use the option file with content:

    MAX 2 PTS USER bill
    MAX 2 PTON USER bill

    Replacing bill with ALL_USERS will introduce this restriction for all users. Apart from USER, such restrictions can also be applied to HOST (hostname), INTERNET (IP address) and other classifiers.

  • RESERVE: reserves a number of tokens for one user/group. For example, to reserve one token of each type PTS and PTON for user bill use the option file with content:


    Apart from USER, such restrictions can also be applied to HOST (hostname), INTERNET (IP address) and other classifiers.

Not all options provided by FLEXlm are enabled in MOSEK. If the options file was processed successfully, relevant messages will appear in the license server’s log file during startup, for example:

15:08:30 (MOSEKLM) Using options file: "mosek.opt"
15:08:30 (MOSEKLM) MAX 2 USER bill for PTS
15:08:30 (MOSEKLM) MAX 2 USER bill for PTON

9.2 Borrowing a license

The lmborrow functionality allows to check out a license from the token server and keep it checked out (borrowed) on another machine for a specified period of time, without a connection to the token server. This way MOSEK can be used on a computer disconnected from the network, for example a laptop used for field service work. When the borrowing period ends, the license automatically expires on the borrowing machine and returns to the token pool of the token server.

Configuring a borrowed license involves a few steps. We assume that a MOSEK floating license is configured and working in advance.

Initialize borrowing

Initially the borrowing client must be connected to the server and must be able to check out a license in a normal way.

  • From the bin of MOSEK on the client machine run

    lmutil lmborrow MOSEKLM 20-may-2023 15:00

    The date (required) and time (optional) specify the end of the borrowing period.

  • Run some code which requires MOSEK on the borrowing client in order to check the out the licenses for the first time. Make sure to run code which checks out all the parts (PTS and if needed PTON) you intend to borrow. You can verify that the required licenses were borrowed by running

    lmutil lmborrow -status

    It should produce output similar to

    lmutil - Copyright (c) 1989-2021 Flexera. All Rights Reserved.
    Vendor     Feature                             Version    Expiration
    ______     ________                            __________ __________
    MOSEKLM    PTS                                 10.00      20-may-23 15:00
    MOSEKLM    PTON                                10.00      20-may-23 15:00

Using the borrowed license

You can now disconnect the client and use the borrowed license in offline mode until its expiry time. When the borrowing period expires the token server will reclaim the borrowed license automatically.

Early check in

You can return the borrowed license to the token server before its designated expiry time. To do this, connect the borrowing client back to the network so that it can communicate with the token server and, depending on which features you borrowed, run one or both of the commands:

lmutil lmborrow -return PTS
lmutil lmborrow -return PTON