License Admin

Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

Installation and Licensing

License Administration Guide

R2024a
How to Contact MathWorks

Latest news: www.mathworks.com

Sales and services: www.mathworks.com/sales_and_services

User community: www.mathworks.com/matlabcentral

Technical support: www.mathworks.com/support/contact_us

Phone: 508-647-7000

The MathWorks, Inc.


1 Apple Hill Drive
Natick, MA 01760-2098
License Administration Guide
© COPYRIGHT 2002–2024 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used or copied
only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form
without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through
the federal government of the United States. By accepting delivery of the Program or Documentation, the government
hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer
software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014.
Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain
to and govern the use, modification, reproduction, release, performance, display, and disclosure of the Program and
Documentation by the federal government (or other entity acquiring for or through the federal government) and shall
supersede any conflicting contractual terms or conditions. If this License fails to meet the government's needs or is
inconsistent in any respect with federal procurement law, the government agrees to return the Program and
Documentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be
trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for
more information.
Revision History
January 2002 First publication Online only
August 2002 Revised Online only
August 2003 Revised Online only
February 2007 Revised Online only
August 2007 Revised Online only
March 2008 Revised Online only
October 2008 Revised Online only
September 2011 Online only Revised for MATLAB 7.13 (Release 2011b)
March 2012 Online only Revised for MATLAB 7.14 (Release 2012a)
September 2012 Online only Revised for MATLAB 8.0 (Release 2012b)
March 2013 Online only Revised for MATLAB 8.1 (Release 2013a)
September 2013 Online only Revised for MATLAB 8.2 (Release 2013b)
March 2014 Online only Revised for MATLAB 8.3 (Release 2014a)
October 2014 Online only Revised for MATLAB 8.4 (Release 2014b)
March 2015 Online only Revised for MATLAB 8.5 (Release 2015a)
September 2015 Online only Revised for MATLAB 8.6 (Release 2015b)
March 2016 Online only Revised for MATLAB 9.0 (Release 2016a)
September 2016 Online only Revised for MATLAB 9.1 (Release 2016b)
March 2017 Online only Revised for MATLAB 9.2 (Release 2017a)
September 2017 Online only Revised for MATLAB 9.3 (Release 2017b)
March 2018 Online only Revised for MATLAB 9.4 (Release 2018a)
September 2018 Online only Revised for MATLAB 9.5 (Release 2018b)
March 2019 Online only Revised for MATLAB 9.6 (Release 2019a)
September 2019 Online only Revised for MATLAB 9.7 (Release 2019b)
March 2020 Online only Revised for MATLAB 9.8 (Release 2020a)
September 2020 Online only Revised for MATLAB 9.9 (Release 2020b)
March 2021 Online only Revised for MATLAB 9.10 (Release 2021a)
September 2021 Online only Revised for MATLAB 9.11 (Release 2021b)
March 2022 Online only Revised for MATLAB 9.12 (Release 2022a)
September 2022 Online only Revised for MATLAB 9.13 (Release 2022b)
March 2023 Online only Revised for MATLAB 9.14 (Release 2023a)
September 2023 Online only Revised for Version 23.2 (R2023b)
March 2024 Online only Revised for Version 24.1 (R2024a)
Contents

Licensing Overview
1
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

Master Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3


What Is a Master License? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Benefits of a Master License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Master License Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3

Administering Individual Licenses


2
Individual License Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2

Administering Designated Computer Licenses


3
Designated Computer License Administration . . . . . . . . . . . . . . . . . . . . . . 3-2

Administering Network Named User Licenses


4
Network Named User License Administration . . . . . . . . . . . . . . . . . . . . . . 4-2
Network Named User Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Set Up Named User Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2

Administering Concurrent Licenses


5
Concurrent License Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Network Concurrent User Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Key Administrative Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Design Your Network Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

v
Use Timeouts for Idle License Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3

Licensing for MATLAB Running on the Cloud


6
License Requirements for MATLAB on Cloud Platforms . . . . . . . . . . . . . . 6-2

Borrow Network Licenses


7
Borrow Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
License Borrowing Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Enable License Borrowing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Turn on Borrow Products Menu Option . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Borrow Product Licenses by Selecting Products . . . . . . . . . . . . . . . . . . . . 7-3
Borrow Product Licenses Automatically . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Return Borrowed Licenses Early . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Manage License Borrowing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5

vi Contents
1

Licensing Overview

• “Audience” on page 1-2


• “Master Licenses” on page 1-3
1 Licensing Overview

Audience
This guide contains instructions for performing tasks concerning the installation and licensing of
MathWorks® products. For some procedures, you must be an administrator on the license. To learn if
you are an administrator on a license, go to License Center on the MathWorks website.

See Also

Related Examples
• “Master Licenses” on page 1-3
• “Administering Individual Licenses”
• “Administering Designated Computer Licenses”
• “Administering Network Named User Licenses”
• “Borrow Licenses” on page 7-2

1-2
Master Licenses

Master Licenses
What Is a Master License?
In MathWorks software licensing, all your licenses fall under a single Master License. A Master
License enables you to organize MathWorks licenses for easy administration and renewal. A Master
License has these characteristics:

• Can have one or multiple licenses, each of which can have different license options.
• Can have one administrator or multiple administrators, each of whom can centrally manage all
licenses within a Master License.

Benefits of a Master License


A Master License:

• Presents a summarized view of all products across multiple licenses.


• Provides a single Software Maintenance Service renewal for all licenses within the Master
License.
• Offers flexibility for how you prefer to organize your licenses.

Master License Organization


You can choose to organize all your licenses under a single Master License or have multiple separate
Master Licenses (some restrictions may apply; contact Customer Support to find out more about your
Master License). Your choice depends on your preference for centralized administration, purchasing,
and renewal cycle.

• A Master License provides a single Software Maintenance Service renewal for all licenses within
the Master License. If you want to receive a single renewal quote, put all your licenses in one
Master License.
• Multiple Master Licenses can accommodate multiple budgetary or purchasing cycles, confine
administrators access to only their licenses, and distinguish between groups of licenses such as
those for different departments.

1-3
1 Licensing Overview

To access your Master License, go to the License Center.

See Also

More About
• “Individual License Administration” on page 2-2
• “Designated Computer License Administration” on page 3-2
• “Network Named User License Administration” on page 4-2
• “Concurrent License Administration” on page 5-2

1-4
2

Administering Individual Licenses


2 Administering Individual Licenses

Individual License Administration


You can install and run the software on multiple computers. Each installation is restricted for use by a
particular computer and a particular user name.

You can install MathWorks products on individual computers in one of two ways:

• Standard installation — You will need a MathWorks Account for standard online installation.
Follow the instructions in “Download and Install MATLAB”.
• Offline installation (install with a File Installation Key)— You will need the following:

• A MathWorks Account to retrieve the license file and File Installation Key associated with the
license from the License Center, and
• An Internet connection to download the installer and product installation files, which you will
then take to the offline machine.

Follow the instructions at “Download Products Without Installing” and “Install MathWorks
Products on Offline Computer”.

See Also

Related Examples
• “Install Products”
• “Update Your License”

External Websites
• License Center

2-2
3

Administering Designated Computer


Licenses
3 Administering Designated Computer Licenses

Designated Computer License Administration


A Designated Computer License authorizes you to install and run MathWorks software on only one
computer. The installation is restricted for use to a host ID that identifies a particular computer, but
not a particular user. Any number of people can log in and use the software, but not simultaneously.

Note Users on a Designated Computer license must be physically present to use the software. The
Designated Computer license does not allow remote access.

To install MathWorks products on an Designated Computer License, run the MathWorks product
installer. During installation, you log in to your MathWorks Account, select the license that you want
to install, and provide the information requested by the other installer dialog boxes. The installer
determines which products to install based on the license you specify.

You can install MathWorks products on individual computers in one of two ways:

• Standard installation — You will need a MathWorks Account for standard online installation.
Follow the instructions in “Download and Install MATLAB”.
• Offline installation (install with a File Installation Key)— You will need the following:

• A MathWorks Account to retrieve the license file and the File Installation Key associated with
the license. The File Installation Key identifies the products you can install. The Administrator
on the license can retrieve the File Installation Key from the License Center.
• An Internet connection to download the installer and product installation files, which you will
then take to the offline machine.

Follow the instructions at “Download Products Without Installing” and “Install MathWorks
Products on Offline Computer”.

See Also

Related Examples
• “Install Products”
• “Update Your License”

External Websites
• License Center

3-2
4

Administering Network Named User


Licenses
4 Administering Network Named User Licenses

Network Named User License Administration

Network Named User Licensing


A Network Named User license authorizes a specified number of Named Users to install and run
MathWorks products over a network, administered under a single license. The list of authorized users
must be specified by their MathWorks user name. A Network Named User license can include
multiple products, each with the same or different licensed user count. This type of license requires a
license server.

As the Administrator of a Network Named User license, you have two primary goals:

• Setting up an installation that optimizes accessibility to the products. See “Install License
Manager on License Server”.
• Ensuring that only authorized users have access to the products. See “Set Up Named User
Licensing” on page 4-2.

Set Up Named User Licensing


How to Specify Authorized Users

With Network Named User licenses, MathWorks uses an options file for the network license manager
to identify the specific Named Users to whom you have assigned right-to-use privileges. The options
file is a text file that contains option statements. An option statement begins with a keyword that
identifies the option, such as RESERVE, INCLUDE, EXCLUDE, GROUP, or HOST_GROUP.

Note Do not confuse your license file with your network license manager options file. The license file
contains the encrypted passcodes for each product you are licensed to install and run. The network
license manager options file is a text file that contains license manager option statements.

If you have a Network Named User license, after you install your products, you might need to:

• Check that the network license manager options file includes all licensed users — see “Check the
Options File” on page 4-2.
• Check that the DAEMON line in your license file includes the options file location — see “Make Sure
Your DAEMON Line Includes Your Options File” on page 4-3.

For more detailed information about creating network license manager options files, see the License
Administration Guide, available in PDF form in matlabroot/etc/LicenseAdministration.pdf,
where matlabroot represents your installation folder. This file is available only after you have
installed the network license manager.

Check the Options File

As part of the installation process, the MathWorks installer creates a network license manager
options template file, named MLM.opt, in the etc subfolder of your top-level MATLAB® installation
folder. In this options template, the installer puts an INCLUDE line for each product you are licensed
to install and run. By default, the installer puts the user name of the person who performed the
installation in these INCLUDE lines. If you performed your own installation, the options file might not
need editing. However, if you performed the installation for another user, or if your license server is

4-2
Network Named User License Administration

installed on Linux® and you had root privileges when you performed the installation, you will need to
edit this options template.

For example, if your user name is sysadmin, the options file would look like this.

INCLUDE MATLAB USER sysadmin


INCLUDE Signal_Toolbox USER sysadmin
INCLUDE Optimization_Toolbox USER sysadmin

You must replace sysadmin in these INCLUDE statements with the user names of the licensed users.
Because the installer includes the GROUPCASEINSENSITIVE option in the options file and sets it to
ON, login names are not case sensitive. If multiple users are licensed for the same product, you must
create a separate INCLUDE line for each user or collect the users into a group, using the GROUP
syntax, and specify the name of the group in an INCLUDE line. The number of users must not exceed
the number of license keys available for that product. This example shows both methods.

Note If you edit the options file, make certain that there are no extra space characters at the end of
each INCLUDE line.

GROUPCASEINSENSITIVE ON
GROUP matlab_users tom judy mike jean brad
GROUP signal_users tom mike brad
INCLUDE MATLAB GROUP matlab_users
INCLUDE Signal_Toolbox GROUP signal_users
INCLUDE Optimization_Toolbox USER mike
INCLUDE Optimization_Toolbox USER jean

Make Sure Your DAEMON Line Includes Your Options File

When the installer creates an options file during installation, it also adds the Options= syntax to the
DAEMON line in your license file. This syntax specifies the pathname of the options file.

For example, if your server is named thunderball and its mac address is 03:42:f8:1b:b2:72, the
SERVER and DAEMON lines in your license file would look like this:

SERVER thunderball 03:42:f8:1b:b2:71


DAEMON MLM "C:\Program Files\MATLAB\R2024a\etc\win64\MLM.exe" \
options="C:\Program Files\MATLAB\R2024a\etc\mlm.opt"

See Also

Related Examples
• “Update Network License”
• “Borrow Licenses” on page 7-2

External Websites
• License Center

4-3
5

Administering Concurrent Licenses

This topic describes how to administer a Concurrent User license.


5 Administering Concurrent Licenses

Concurrent License Administration

Network Concurrent User Installation


You, as Administrator, are responsible for installing the network license manager on a central server
on your network. This system is referred to as your license server. Users run MATLAB on their own
computers, called client systems, that are connected to the license server over a network. A computer
running Windows® can act as a license server for Linux or macOS clients, and conversely. For
instructions about installing MATLAB products on a license server, see the network license manager
installation instructions in the installation documentation.

Key Administrative Tasks


A Concurrent license enables you to make MathWorks products available to anyone with access to
your network. Access is not limited to specific named users, as it is with a Network Named User
license. Rather, Concurrent licenses use license keys to control access. Users check out a license key
when they start MATLAB or use functions in other products. When all the keys for a particular
product are checked out, the network license manager denies further requests.

As Administrator for a Concurrent license, your primary goal is to set up an installation that optimizes
accessibility to the products. The fundamental tasks required to administer a Concurrent license are:

1 Determine how you want to configure the products for users — There are several possible
configurations. Decide whether users will install MATLAB on their computers or access MATLAB
over a network. See “Install Products on Client Machines”.
2 Install the software on the computers required by the configuration — You must install the
network license manager on a file server and, depending on your configuration, either install
MathWorks products on a file server or install the products on client computers. You can use the
MathWorks installer to perform all of these installations. See “Install Products on Client
Machines”.

Design Your Network Configuration


For network installations, MathWorks uses a network license manager program, from Flexera
Software, Inc. To set up a network installation, you must install the license manager and install
MathWorks products. You use the MathWorks installer to perform both installations. If you want to
integrate MathWorks products into an already established license management scheme, you can copy
the MathWorks license management daemons onto your computer.

Before you install MATLAB in a network installation, decide what type of configuration you want to
set up. This decision determines how many installations you need to perform. This topic describes
these options.

Set Up Local Client Access Configuration

In a local client access configuration, you install the network license manager on a server and you
install MATLAB on each client computer. When users on client computers start MATLAB, it contacts
the license manager over the network to check out a license key.

To install MATLAB on client computers in your network, follow the instructions in “Install Products”.

5-2
Concurrent License Administration

Set Up a Network Access Configuration

In Network Concurrent User installations, you can set up a network access configuration by installing
MATLAB and other products on a file server and have client computers access products over the
network, or you can setup a local access configuration by installing products on each client computer.
In this scenario, clients communicate with the server only when they check out a license key.

Note You must activate the license for the installation before you run the installer. To retrieve the
license file needed for your configuration, go to the License Center at the MathWorks website.

You must provide the host ID of the computer on which you intend to run the network license
manager when requesting a license file. You specify the location of your license file during
installation.

Use Timeouts for Idle License Keys


Overview

If you have a Concurrent license, you can use the licensing timeout option to automatically return idle
license keys at your site. With license timeouts, the network license manager automatically frees
license keys that sit idle for a specified period of time, returning the licenses to the pool of available
license keys.

For example, when you start MATLAB and other products, such as toolboxes, you check out license
keys for these products. If you go home without exiting your MATLAB session, these licenses remain
checked out and are not available to other users. With timeouts enabled, after your licenses sit idle
for a specified period, the network license manager releases the license keys for all the products you
had been using and these keys become available to other users.

Enable License Timeouts

To take advantage of timeouts, you must specify the TIMEOUT option in the options file for the
network license manager. This options file is a text file that contains license manager options
statements, such as INCLUDE, EXCLUDE, and GROUP statements.

To enable timeouts:

1 Create an options file, if one does not exist, using any text editor. Name the options file MLM.opt
and put the file in the matlabroot/etc/$ARCH folder, where matlabroot represents your
installation folder and $ARCH represents a platform-specific folder. For example, on a Windows
computer, you might create the file
C:\Program Files\MATLAB\R2024a\etc\win64\MLM.opt
2 Add the TIMEOUT option to the options file, using the following syntax:
TIMEOUT feature seconds

For feature, specify MATLAB. You cannot specify separate timeout values for individual
MathWorks products, such as toolboxes.

For seconds, specify the amount of idle time you want to allow. The minimum value is 4 hours
(14,400 seconds). If you specify a timeout value that is smaller, the minimum value is used. For
example, to specify a five-hour time-out, enter the following in your options file.

5-3
5 Administering Concurrent Licenses

TIMEOUT MATLAB 18000


3 Make sure the DAEMON line in your license file specifies the location of your options file. The
license file DAEMON line must include the options= syntax. For example, your DAEMON line might
look like the following:
DAEMON MLM "C:\Program Files\MATLAB\R2024a\etc\win64\MLM.exe" \
options="C:\Program Files\MATLAB\R2024a\etc\win64\mlm.opt"
4 Stop the network license manager and restart it. Whenever you change the license file, or change
the time-out value in the options file, you must restart the license manager.

Experiencing a License Timeout

You may experience a license timeout when:

• Timeout is enabled, and


• You leave a MATLAB session inactive for an extended period of time.

Under these conditions, the network license key(s) are returned but MATLAB remains open.

The timeout is recorded in the network license manager log file, as follows:

Idle session. Returning keys for <user>@<machine>

To resume a MATLAB session that has timed out, start using MATLAB again. If a license key is
available, MATLAB checks it out automatically. If a license key is not available, MATLAB issues a
warning and tries again. MATLAB will make 10 attempts before exiting.

Note If you return to a Simulink® session that has timed out, and no licenses are available, you
cannot run or modify a currently open model. These menu options are disabled until a Simulink
license key becomes available. You can, however, save a model in a Simulink session that has timed
out.

See Also

Related Examples
• “Borrow Licenses” on page 7-2
• “Install Products”

5-4
6

Licensing for MATLAB Running on the


Cloud
6 Licensing for MATLAB Running on the Cloud

License Requirements for MATLAB on Cloud Platforms


Eligible licensed users can run certain MathWorks products on public cloud platforms, such as
Azure® and AWS®. Some products can also be packaged in containers for use in a cloud environment.
Eligibility and configuration requirements for using MathWorks products in containers or public
clouds depend on the license type.

Note License administrators: For information about how to configure the network license manager
for use with MathWorks products on the cloud, see “Configure License Manager for MATLAB on
Cloud Platforms”.

If you do not know what type of license you have or what products you are licensed for, you can look
in your MathWorks Account:

1 Sign in to your MathWorks Account.


2 Under My Software, view the license (or licenses).

Under Options, note the license type.


3 Under License, click the license number to see the products on that license.

If you do not have a MathWorks Account, you can create an account at https://www.mathworks.com/
mwaccount/register. You can then link the license you are using to your MathWorks Account or
purchase a license if you do not have one.

To determine whether your license is eligible to run MathWorks products on the cloud, consult the
following table.

Product License Conditions


MATLAB Online Eligible licensed MATLAB users can use MATLAB Online™ without
additional configuration. To see whether your license type is eligible, see
MATLAB Online.

Your license must be current on Software Maintenance Service (SMS).

6-2
License Requirements for MATLAB on Cloud Platforms

Product License Conditions


MATLAB The following license types are supported:

• On public clouds • Campus-Wide — License that belongs to your academic institution and
• In containers is for your use only.

• In Cloud Center • Individual — License that is in your name and is for your use only.

• In Jupyter® environments • Network Named User and Concurrent — Licenses managed on a


server by a license administrator.

Additionally, your license must be:

• Linked to a MathWorks Account.


• Configured for cloud use.

• Campus-Wide and Individual licenses are already configured for


cloud use.
• For Network Named User and Concurrent licenses, contact your
license administrator to find out if your license is configured for
cloud use. The license administrator might need to make some
changes on the license server to enable you to run MATLAB in the
cloud. To find the administrator for your license, select your license
from the MathWorks License Center and click Contact
Administrator(s).

Note When running MATLAB on a virtual machine, make sure that the
MAC address that identifies the machine on the network is static
(unchangeable). Without a static MAC address, your machine might be
assigned a new one when it restarts. This new address counts toward the
maximum number of machines that your license permits you to run
MATLAB on, potentially causing you to exceed your license limit. The way
to obtain a static MAC address varies by cloud platform. For example:

• Azure — When you create a virtual network, the virtual network MAC
address is retained even when the virtual machine is in the
deallocated state.
• AWS — Use an Elastic Network Interface (ENI), which contains a
static MAC address attribute.

Additionally, for containers:

• Your license must be valid for all MathWorks products in the


container.
• (Concurrent licenses only) When running containers, you must supply
the port number and DNS address of the network license manager.
Add this option to the docker run command when you start the
container: -e MLM_LICENSE_FILE=27000@MyLicenseServer. For
more details, see .

6-3
6 Licensing for MATLAB Running on the Cloud

Product License Conditions


MATLAB Parallel Server™ The following license types are supported:

• On public clouds • MATLAB Parallel Server license hosted by your organization using the
• In containers network license manager

• In Cloud Center • MATLAB Parallel Server cloud-based licensing. Users must be added
to the license by their license administrator in License Center. Users
who have the license already linked to their MathWorks Account do
not need to be added.

To learn more, see Online Licensing for MATLAB Parallel Server.


MATLAB Production Server™ Your license must be:

• On public clouds • Concurrent license type.


• Configured to use a network license manager on the virtual network.
By default, the deployment of MATLAB Production Server includes a
network license manager, but you can also use an existing license
manager. In either case, activate or move the license after
deployment.

If you do not have an eligible MATLAB Production Server license, you can
use the MATLAB Production Server pay-as-you-go offerings on Azure or
AWS.
MATLAB Web App Server™ Your license must be:

• On public clouds • Concurrent license type.


• Configured to use a network license manager on the virtual network.
By default, the deployment of MATLAB Web App Server includes a
network license manager, but you can also use an existing license
manager. In either case, activate or move the license after
deployment.

See Also

Related Examples
• Use MATLAB in the Cloud

6-4
7

Borrow Network Licenses

This topic describes how to borrow a Concurrent User or Named User license.
7 Borrow Network Licenses

Borrow Licenses
License Borrowing Overview
To provide license mobility, MathWorks supports license borrowing.

• This capability lets you use MathWorks products on computers that do not have a continuous
connection to the license server.

After you borrow a license, you can disconnect your computer from the network and continue to
use the products you have checked out until the borrow period expires.

You can also return a borrowed license early.


• Commercial Concurrent and Network Named User licenses can use license borrowing.
• The maximum borrow period is 30 days (720 hours).
• MathWorks products must be installed on client computers where the borrowed license will be
used.

Note Campus-Wide licenses, including Concurrent licenses, cannot use license borrowing.

Enable License Borrowing


You must be an Administrator of the license to enable license borrowing.
1 Request that borrowing be enabled on your license from MathWorks. To request this change, go
to the MathWorks website at https://www.mathworks.com and click Support. On the support
page, click Contact support.

Notes

• In license files with borrowing, the INCREMENT lines for products include the keyword
BORROW=720, where 720 is the maximum number of hours in the borrow period (you cannot
change this value). For example:
INCREMENT MATLAB MLM 17 30-jan-2025 5 52FCH63184G5 BORROW=720 \
DUP_GROUP=UH SN=220668
• The maximum borrow period of 720 hours is equal to 30 days.

After your license is enabled for borrowing, you will download a new license file.
2 On your license server, stop the network license manager.
3 On your license server, copy the SERVER and DAEMON lines from the existing license file,
matlabroot/etc/license.dat, where matlabroot represents your MATLAB installation
folder. For example, here are the SERVER and DAEMON lines from a license file:
SERVER mysystem 0012110gbc86 27000
DAEMON MLM C:\Program Files\MATLAB\R2024a\etc\win64\MLM.exe
4 Paste the SERVER and DAEMON lines that you copied from your existing license file at the top of
the new license file that includes the license borrowing capability.

7-2
Borrow Licenses

5 On your license server, replace the existing license file with the new license file.
6 Restart the network license manager.

Turn on Borrow Products Menu Option

Note Ensure that the client computer has a network connection to the license server.

To turn on the menu option for Borrow Products in the Licensing menu:

1 On the client computer, start MATLAB and enter this command:


matlab.internal.licensing.enableBorrowUI(true)

After you turn on the menu option for License Borrowing the first time, it remains available any
time you start MATLAB.
2 Restart MATLAB.
3 Locate the Borrow Products option in the Licensing menu.

a On the Home tab, in the Resources section, click Help.


b Under Licensing, look for Borrow Products.

Borrow Product Licenses by Selecting Products


To borrow licenses by product name:

1 Start MATLAB.

7-3
7 Borrow Network Licenses

2 On the Home tab, in the Resources section, click Help.


3 Under Licensing, click Borrow Products.
4 Select Borrow selected products by choosing from a list. The dialog box displays the
products that can be borrowed.
5 Specify the borrow period: from 1 day (default) to 30 days.
6 Click the check box next to each product that you want to borrow.
7 Click Borrow.
8 Close MATLAB.
9 Disconnect your computer from the network.

When you reopen MATLAB, your borrowed products can be used away from your network.

Continue using the borrowed products until the borrow period expires. If you reconnect to your
network before the end of the borrowing period, see “Return Borrowed Licenses Early” on page 7-
4.

Borrow Product Licenses Automatically


To borrow product licenses automatically:

1 Start MATLAB.
2 On the Home tab, in the Resources section, click Help.
3 Under Licensing, click Borrow Products.
4 Select Borrow products automatically as you work with them.
5 Specify the borrow period: from 1 day (default) to 30 days.
6 Click Turn On Auto Borrow.
7 Work in MATLAB as you would normally, performing the tasks you want to perform when you are
disconnected from the network. As you use products, MATLAB borrows the licenses for them
automatically.

When you have finished working with all the products you want to borrow, click Turn Off Auto
Borrow.
8 Close MATLAB.
9 Disconnect your computer from the network.

When you reopen MATLAB, your borrowed products can be used away from your network.

Continue using the borrowed products until the borrow period expires. If you reconnect to your
network before the end of the borrowing period, see Return Borrowed Licenses Early in the next
section.

Return Borrowed Licenses Early


To return a borrowed license early:

1 Connect your computer to your network.


2 On the Home tab, in the Resources section, click Help.

7-4
Borrow Licenses

3 Under Licensing, click Borrow Products.

4 Select Return borrowed products early. The dialog box displays a list of currently borrowed
products.
5 Specify the product licenses you want to return early. By default, all borrowed product licenses
are selected. Deselect any products you do not want to return.
6 Click Return.

Note You cannot borrow licenses and then return them in the same MATLAB session. You must quit
MATLAB and restart it before you can return the licenses.

Manage License Borrowing


Use an options file to control license borrowing behavior. Use the network license manager tools to
monitor which licenses are borrowed.

Determine Which Licenses Are Currently Borrowed

The network licensing manager provides tools that you can use to monitor the status of borrowed
licenses in your network configuration. You can use the LMTOOLS application or the lmstat
command.
Use LMTOOLS Application on Windows Systems

1 Log in to your license server.


2 Navigate to the matlabroot\etc\win64 folder, where matlabroot represents the name of
your MATLAB installation.

7-5
7 Borrow Network Licenses

3 Start the LMTOOLS application by double-clicking the lmtools.exe executable file.


4 Select the Server Status tab in the LMTOOLS dialog box.
5 Click the Perform Status Enquiry button. LMTOOLS displays the status information in the
output window. In the status information, each entry in the list for a product shows the total
number of licenses for the product and tells how many licenses are currently checked out. For
borrowed licenses, the entry for the product includes the keyword (linger:XXX), where XXX
specifies the borrow period in seconds.
lmutil - Copyright (c) 1989-2018 Flexera. All Rights Reserved.
Flexible License Manager status on Thu 12/9/2021 15:43

[Detecting lmgrd processes...]


License server status: 27000@myserver
License file(s) on myserver: C:\Program Files\MATLAB\R2024a\etc\license.dat:

myserver: license server UP (MASTER)inclusivetermexception v11.16.2

Vendor daemon status (on myserver):

MLM: UP v11.16.2
Feature usage info:

Users of MATLAB: (Total of 13 licenses issued; Total of 1 license in use)

"MATLAB" v46, vendor: MLM, expiry: 30-jan-2025


vendor_string: vi=0:at=200:ae=1:lu=300:lo=CN:ei=1234567:lr=1:ep=0:
floating license

juser myserver DESKTOP-4SPTFG0 (v45) (myserver/27000 102), start Thu 12/9 15:41

Users of SIMULINK: (Total of 1 license issued; Total of 0 licenses in use)

Users of Compiler: (Total of 1 license issued; Total of 1 license in use)

"Compiler" v46, vendor: MLM, expiry: 30-jan-2025


vendor_string: vi=0:at=200:ae=1:lu=300:lo=CN:ei=1234567:lr=1:ep=0:
floating license

juser myserver DESKTOP-4SPTFG0 (v45) (myserver/27000 201), start Thu 12/9 15:43 (linger: 807316 / 807360)

Note MATLAB Compiler™: License status information may contain linger even when MATLAB
Compiler is not being borrowed.

Use lmstat Utility on Windows Systems

1 Log in to your license server and open a DOS command window. One way to open the DOS
command window is to select the Run option from the Start menu, type cmd in the text entry
field, and then click OK.
2 Navigate to the matlabroot\etc\$ARCH folder, where matlabroot represents the name of
your MATLAB installation and $ARCH represents a platform-specific folder.
3 Run the lmutil command specifying lmstat as an argument. (On Windows computers,
FlexNet® packages all its license management utilities into one program, lmutil.)

The following example uses the -a option to display all the information returned by lmstat.
Note that you must also use the -c option to specify the name of your license file. For more
information about lmstat, see the FlexNet End User’s Guide.
lmutil lmstat -a -c "C:\Program Files\MATLAB\R2024a\etc\license.dat"

In the status information returned by lmstat, each entry in the list for a product shows the total
number of licenses for the product and tells how many licenses are currently checked out. For
borrowed licenses, the entry for the product includes the keyword (linger:XXX), where XXX
specifies the borrow period in seconds.

7-6
Borrow Licenses

"Control_Toolbox" v46, vendor: MLM


floating license
carlostessier lm-server lm-server (v46) (lm-server/27000 201), start Fri 12/17 14:37
(linger: 121500)

Note MATLAB Compiler: License status information may contain linger even when MATLAB
Compiler is not being borrowed.

Use lmstat on Linux Systems

1 Log in to your license server.


2 Navigate to the matlabroot/etc directory, where matlabroot is your MATLAB installation
folder.
3 Run the lmstat utility.

lmstat -a -c /usr/local/MATLAB/R2024a/etc/license.dat

Control License Borrowing with Options Files

You can control various aspects of license borrowing behavior using an options file for the network
license manager. An options file is a text file that contains option statements. Each option statement
begins with a keyword that identifies the option. The following table lists the options you use to
control aspects of license borrowing. For more information about these options, see the FlexNet End
User’s Guide. To see an example of an options file, see the example in the next topic.

Task Option to Specify


Reserve a specific number of licenses Use the BORROW_LOWWATER option.
that cannot be borrowed.
For example, to make sure that three MATLAB licenses can
never be borrowed, use this syntax:

BORROW_LOWWATER MATLAB 3
Specify which users can borrow Use the INCLUDE_BORROW option.
licenses for a particular product.
For example, to allow the user Fred to borrow a license for
the Image Processing Toolbox™, use this syntax:

INCLUDE_BORROW Image_Toolbox USER fred

Note: When you specify that a particular user can borrow


licenses, you exclude all other users.
Specify which users cannot borrow Use the EXCLUDE_BORROW option.
licenses for a particular product.
For example, to prevent the user Donna from borrowing a
license for the Image Processing Toolbox, use this syntax:

EXCLUDE_BORROW image_toolbox USER donna

7-7
7 Borrow Network Licenses

Task Option to Specify


Specify the maximum amount of time a Use the MAX_BORROW_HOURS option.
user can borrow a license.
For example, to limit users of the Image Processing Toolbox
to a three day borrow period, use this syntax:

MAX_BORROW_HOURS image_toolbox 72

The borrow period you specify must be less than 30 days,


which is the borrow period specified in borrow-enabled
licenses from MathWorks.

Example: Exclude a User from Borrowing a License

To illustrate using an options file to control license borrowing behavior, this example uses an options
file to exclude a user from borrowing a license for a specific product:

1 Create the options file.

An options file is a text file that contains options statements. Using any text editor, create a file
that contains the following line. You can give the options file any name and store it in any
convenient folder.

EXCLUDE_BORROW SIMULINK USER fred


2 Specify the name of the options file on the DAEMON line in your license file.

On your license server, use any simple text editor to edit your license file, adding the options=
keyword to the DAEMON line, as follows. Be sure to use the line continuation character (\) if the
DAEMON line extends beyond a single line.

DAEMON MLM C:\Program Files\MATLAB\R2024a\etc\win64\MLM.exe \


options=C:\myborrowoptions.opt
3 Start (or restart) the network license manager so that it processes the options file.

After setting up this options file, test it:

1 Log in as the user Fred.


2 Start MATLAB.
3 Use the Borrow Products menu to select Simulink for borrowing.

You should get the following error:

License Manager Error -38.


User/host on EXCLUDE list for feature
Feature: SIMULINK
License path: C:\Program Files\MATLAB\bin\win64\license.dat;
C:\Program Files\MATLAB\bin\win64\*.lic

See Also

More About
• “Network Named User License Administration” on page 4-2

7-8
Borrow Licenses

• “Concurrent License Administration” on page 5-2

7-9

You might also like