Product Support
1303 - FLEXnet Guide
Introduction
Administration of FLEXnet
- Is There a List of FLEXnet Utilities or Scripts?
- Is There a GUI Available for License Administration? What is the LMTOOLS Executable on Windows?
- How Do I Monitor the Usage (Number of Users) of FLEXnet Licenses or Keys for MATLAB and the Toolboxes?
- Can I Have Redundant Servers for FLEXnet? How Do I Set This Up?
- Can I Reserve or Deny Product Licenses to a Particular User or Group of Users? What Is a Local Options File?
- Can I Run Multiple MATLAB License Files From One Server?
Troubleshooting FLEXnet
- What Is A License or Debug Log File? How Do I Read It?
- What Does "License Manager Error -X" Mean? How Can I Fix This Problem?
- How Can I Set Up MATLAB to Run With My Existing FLEXnet Installation?
- Where Can I Find More Information About FLEXnet?
Section 1: What Is FLEXnet? Who Makes FLEXnet?
FLEXnet is a popular license management tool on the market today. It allows software to "float" on a network and not be tied to one particular machine. This involves a server-client relationship that requires a client machine to first successfully check out a license from the server in order for an application to be used on that client machine. The criteria for checking out a license can vary according to how the license management is configured.
Flexera Software Inc. makes FLEXnet. For more detailed information about FLEXnet, visit the Flexera Software Web site.
Section 2: How Does FLEXnet Work?
There are four main components to FLEXnet:
- License manager daemon (lmgrd) - makes initial contact with client application (e.g., MATLAB) and starts and restarts vendor daemons
- Vendor daemon (MLM) - keeps track of the number of licenses checked out and who has each license by accessing memory and granting or denying license checkouts
- License file (license.dat) - contains licensing data within a text file. It is created by the software vendor (e.g., The MathWorks) and edited during installation
- Application program (e.g., MATLAB) - communicates with the vendor daemon to request a license for check out
Here is a breakdown of the license request process:
FLEXnet-licensed applications can either be counted or uncounted. Counted means that a license manager is needed to allow for license checkout. Uncounted licenses do not use a license manager; rather, license management depends solely on the contents of the license file.When you run a counted FLEXnet-licensed application, the following occurs:
- The license module in the client application (e.g., MATLAB) finds the license file, which includes the hostname of the license server node and port number of the server with which the license manager daemon, lmgrd, communicates.
- The client establishes a connection with the license manager daemon on the server (lmgrd) and tells it which vendor daemon it needs to talk to.
- lmgrd determines which machine and port correspond to the master vendor daemon and sends that information back to the client.
- The client establishes a connection with the specified vendor daemon and sends a request for a license.
- The vendor daemon checks to see if any licenses are available and sends a grant or denial message back to the client.
- The license module in the application (e.g., MATLAB) grants or denies usage of the feature, as appropriate.
Here is a flow chart view of the license request process with the above steps labeled:
Section 3: Is There a List of FLEXnet Utilities or Scripts?
FLEXnet provides utilities for the license administrator to help manage the licensing activities on the network. Please note that the specific set of utilities packaged with an application may vary from vendor to vendor. Below is a table of the most common utilities used with FLEXnet and MATLAB:
| FLEXnet Utility | Utility Description |
| lmdown | Shuts down all license daemons (both lmgrd and all vendor daemons) on the license server node (or on all three nodes in the case of three-server redundant servers) |
| lmdebug | (UNIX only) Places license status, debug information, and license debug log output in a single file for troubleshooting purposes |
| lmhostid | Reports the hostid of a system |
| lmremove | Releases a hung license to the pool of free licenses |
| lmstat | Displays the status of a license server. (When used with the –a flag, this utility will display all of the features that have been checked out, by which user, and on which machine.) |
| lmstart | Ends existing license manager processes and starts a new license manager process (restarting the License Manager) |
| lmver | Reports the FLEXnet version of a library or binary file |
| lmdiag | Diagnoses license checkout problems |
A detailed list of all FLEXnet utilities can be found on the Flexera Software Web site.
Note: Not all FLEXnet utilities are shipped with MATLAB. Under Windows, all FLEXnet utilities shipped with MATLAB (except lmgrd) come packaged as a single executable called lmutil. Users must pass the name of the utility they would like to run to the lmutil executable, with a syntax such as lmutil <command>.
For example:
lmutil lmstat
or
lmutil lmhostid
These commands are typed in a DOS window, in the $MATLAB\etc\win32|win64 directory (where $MATLAB is the root MATLAB directory)($MATLAB\flexlm for releases prior to R2010b on Windows). There is also a graphical user interface (GUI) for these commands on Windows called LMTOOLS (see next section)
Under UNIX, Linux, and Mac, all FLEXnet utilities shipped with MATLAB have their own scripts. Users can pass only the name of the utility to the UNIX/Linux prompt
lmstat -a
or
lmdebug
All FLEXnet utilities shipped with MATLAB are located in $MATLAB/etc (where $MATLAB is the root MATLAB directory).
Section 4: Is There a GUI Available for License Administration? What Is the LMTOOLS Executable on Windows?
FLEXnet provides a graphical user interface (GUI) to its license management tools for Windows. For MATLAB installations, you can invoke this GUI by double-clicking on the lmtools.exe file in the in the $MATLAB\etc\win32|win64 directory (where $MATLAB is the root MATLAB directory)($MATLAB\flexlm for releases prior to R2010b on Windows). The GUI uses buttons to provide access to the same set of tools as the lmutil script (also located in same directory) and displays the results returned in an integrated display window.
For example, to use the lmtools GUI to monitor the status of network license activity, click the 'Perform Status Inquiry' button on the Server Status Tab.
lmutil lmstat -a
at the DOS prompt.
Section 5: How Do I Monitor the Usage (Number of Users) of FLEXnet Licenses or Keys for MATLAB and the Toolboxes?
There are a few ways to do this:
- If you want to check the current usage, the best way is to
use the lmstat function. On UNIX, Linux, Mac,
you can log into the server and run the following command:
$MATLAB/etc/lmstat -a
(where $MATLAB is the root MATLAB directory)
On Windows, either run the appropriate following command in a DOS shell from the actual license server machine:$MATLAB\etc\win32\lmutil lmstat -a
$MATLAB\etc\win64\lmutil lmstat -a
(where $MATLAB is the root MATLAB directory)
or use the lmtools GUI, lmtools.exe, found in in the $MATLAB\etc\win32|win64 directory($MATLAB\flexlm for releases prior to R2010b on Windows), to check the status of licenses. This feature became available as of MATLAB 6 (R12). Information on the lmtools GUI can be found in the MATLAB Installation Guide for Windows documentation. This output will show who has each license checked out, where they checked it out, and when they checked it out.
- You can also run these commands from the MATLAB client machine as well. As of R2009b, the necessary
files are located in $MATLAB/bin/$ARCH (where $MATLAB is the MATLAB installation directory, and
$ARCH is the directory specific to the architecture of the system. Choices include win32, win64, gnlx86,
glnxa64, maci, maci64, sol64). For releases older than R2009b on Linux/Unix/Mac, you will need to
manually copy the license manager folder from an installation that includes the license manager. To complete this command you will need to add -c port@host, for example on a 32-bit Linux MATLAB client:
$MATLAB/bin/glnx86/lmutil lmstat -a -c port@host
(where $MATLAB is the root MATLAB directory)
You can find out what to put for port@host by looking at the license file found in $MATLAB/licenses ($MATLAB/etc for versions of MATLAB R2007b and older on Unix/Linux/Mac, $MATLAB/bin/win32 or win64 for Windows). Here is an example of the license file:SERVER licensemachine 00ef736492ee 27000 USE_SERVER
And a command based on that license file on this particular 32-bit Linux computer:/usr/local/MATLAB/R2011a/bin/glnx86/lmutil lmstat -a -c 27000@licensemachine
- You can purchase an additional reporting utility from Flexera Software
- If you just want an idea of what is happening and who is
using what, you can use the log file. On UNIX, Linux, and Mac you can
check the file /var/tmp/lm_TMW.log. This file
will show check-ins (when you quit MATLAB - this is when you check a
key back in) and check-outs (when you invoke MATLAB or use a toolbox
function - this is when you check out a key).
On Windows, this file is called lmlog.txt and is usually located in $MATLAB\etc\win32 or $MATLAB\etc\win64 ($MATLAB\flexlm for releases prior to R2010b on Windows).
The following is an example of an lmlog.txt from MATLAB R2011a:17:17:32 (lmgrd) -----------------------------------------------
This log file indicates that the user jsmith took out a MATLAB key from the server ferronelinux at 11:40 and that it was returned at 11:51 when he exited MATLAB. Then, at 12:18, he took out a MATLAB key again, and this time, took out a Simulink key at 12:20.
11:27:44 (lmgrd) Please Note:
11:27:44 (lmgrd)
11:27:44 (lmgrd) This log is intended for debug purposes only.
11:27:44 (lmgrd) In order to capture accurate license
11:27:44 (lmgrd) usage data into an organized repository,
11:27:44 (lmgrd) please enable report logging. Use Acresso Software Inc.'s
11:27:44 (lmgrd) software license administration solution,
11:27:44 (lmgrd) FLEXnet Manager, to readily gain visibility
11:27:44 (lmgrd) into license usage data and to create
11:27:44 (lmgrd) insightful reports on critical information like
11:27:44 (lmgrd) license availability and usage. FLEXnet Manager
11:27:44 (lmgrd) can be fully automated to run these reports on
11:27:44 (lmgrd) schedule and can be used to track license
11:27:44 (lmgrd) servers and usage across a heterogeneous
11:27:44 (lmgrd) network of servers including Windows NT, Linux
11:27:44 (lmgrd) and UNIX. Contact Acresso Software Inc. at
11:27:44 (lmgrd) www.acresso.com for more details on how to
11:27:44 (lmgrd) obtain an evaluation copy of FLEXnet Manager
11:27:44 (lmgrd) for your enterprise.
11:27:44 (lmgrd)
11:27:44 (lmgrd) -----------------------------------------------
11:27:44 (lmgrd)
11:27:44 (lmgrd)
11:27:44 (lmgrd) pid 1788
11:27:44 (lmgrd) Done rereading
11:27:44 (lmgrd) FLEXnet Licensing (v11.6.1.0 build 66138 x64_n6) started on AH-CCHIUCHI (IBM PC) (2/25/2011)
11:27:44 (lmgrd) Copyright (c) 1988-2008 Acresso Software Inc. All Rights Reserved.
11:27:44 (lmgrd) US Patents 5,390,297 and 5,671,412.
11:27:44 (lmgrd) World Wide Web: http://www.acresso.com
11:27:44 (lmgrd) License file(s): C:\Program Files\MATLAB\R2010b\etc\license.dat
11:27:44 (lmgrd) lmgrd tcp-port 27000
11:27:44 (lmgrd) Starting vendor daemons ...
11:27:44 (lmgrd) Started MLM (pid 3256)
11:27:44 (MLM) FLEXnet Licensing version v11.6.1.10 build 83406 x64_n6
11:27:44 (MLM) Server started on AH-CCHIUCHI for: MATLAB
11:27:44 (MLM) SIMULINK Control_Toolbox
11:27:44 (MLM) EXTERNAL FILTERS are OFF
11:27:44 (lmgrd) MLM using TCP-port 53119
11:40:24 (MLM) OUT: "MATLAB" jsmith@ferronelinux
11:51:04 (MLM) IN: "MATLAB" jsmith@ferronelinux
12:18:07 (MLM) OUT: "MATLAB" jsmith@ferronelinux
12:20:25 (MLM) OUT: "SIMULINK" jsmith@ferronelinux
Section 6: Can I Have Redundant Servers for FLEXnet? How Do I Set This Up?
Click here for more information regarding the setup of redundant serversSection 7: Can I Reserve or Deny Product Licenses to a Particular User or Group of Users? What Is a Local Options File?
You can reserve or deny license keys by creating a local options file as outlined in FLEXnet End User's Guide. There are many other settings you can configure with the local options file as well, such as setting a maximum number of keys available to a particular group. You can also see tech support solution 1-1936F Is there a way to administer FLEXnet based licenses? How do I create an Options file?
Section 8: Can I Run Multiple MATLAB License Files From One Server?
Please see the tech support solution 1-18KTK Is it possible to run multiple license files from one server? for more information.
Section 9: What Is A License or Debug Log File? How Do I Read It?
The license log file (or debug log file) can be useful in diagnosing problems with the license manager or particular license keys. Messages are logged to the license log file each time the license manager is brought up, brought down, or when licenses are checked in or out.
The license log files can be used to diagnose configuration problems or daemon software errors. Under Windows, the log file is called lmlog.txt, and can be found in $MATLAB\etc\win32|win64 (where $MATLAB is the root MATLAB directory)($MATLAB\flexlm for releases prior to R2010b on Windows) on the license server. Under UNIX, Linux, and Mac the log file is called lm_TMW.log, and can be found in /var/tmp on the license server.
FLEXnet daemons generate debug log files in the following format:
hh: mm: ss (daemon) message
where
hh: mm: ss = Time that the message was logged.
daemon = Either lmgrd or the vendor daemon name.
In the case where a single copy of the daemon cannot
handle all of the requested licenses,
an optional "_" followed by a number indicates that
this message comes from a forked daemon.
message = The text of the message.
Examples of messages and their meanings in a debug log file can be found in the FLEXnet End User's Guide.
Example of a license or debug log file
Below is an example of a license or debug log file. Notice the messages of license check-in and check-out.
16:05:46 (lmgrd)
-----------------------------------------------
16:05:46 (lmgrd) Please Note:
16:05:46 (lmgrd)
16:05:46 (lmgrd) This log is intended for debug purposes only.
16:05:46 (lmgrd) There are many details in licensing policies
16:05:46 (lmgrd) that are not reported in the information logged
16:05:46 (lmgrd) here, so if you use this log file for any kind
16:05:46 (lmgrd) of usage reporting you will generally produce
16:05:46 (lmgrd) incorrect results.
16:05:46 (lmgrd)
16:05:46 (lmgrd) -----------------------------------------------
16:05:46 (lmgrd)
16:05:46 (lmgrd)
16:05:46 (lmgrd) FLEXnet (v11.4) started on jornalesplinux (linux)
(4/11/2008)
16:05:46 (lmgrd) FLEXnet Copyright 1988-2008 Acresso Software, Inc. All Rights Reserved
Globetrotter Software, Inc.
16:05:46 (lmgrd) US Patents 5,390,297 and 5,671,412.
16:05:46 (lmgrd) World Wide Web: http://www.acresso.com
16:05:46 (lmgrd) License file(s): /var/tmp/lm_TMW.dat
16:05:46 (lmgrd) lmgrd tcp-port 27000
16:05:46 (lmgrd) Starting vendor daemons ...
16:05:46 (lmgrd) Started MLM (internet tcp_port 1058 pid 20134)
16:05:46 (MLM) FLEXnet version 11.4
16:05:46 (MLM) Server started on jornalesplinux for: TMW_Archive
16:05:46 (MLM) MATLAB SIMULINK Real-Time_Workshop
16:05:46 (MLM) Real-Time_Win_Target
16:06:00 (MLM) OUT: "MATLAB" piperj@jornalesplinux
16:06:18 (MLM) OUT: "SIMULINK" piperj@jornalesplinux
16:06:47 (MLM) OUT: "Real-Time_Workshop" piperj@jornalesplinux
16:07:31 (MLM) IN: "MATLAB" piperj@jornalesplinux
16:07:31 (MLM) IN: "SIMULINK" piperj@jornalesplinux
16:07:31 (MLM) IN: "Real-Time_Workshop" piperj@jornalesplinux
22:05:46 (lmgrd) TIMESTAMP 4/12/2008
4:05:46 (lmgrd) TIMESTAMP 4/13/2008
10:05:46 (lmgrd) TIMESTAMP 4/14/2008
0:02:45 (MLM) SIMULINK expired -- rereading to update
0:02:45 (MLM) EXPIRED: SIMULINK
0:02:45 (MLM) EXPIRED: SIMULINK
0:02:45 (MLM) Server started on jornalesplinux for: TMW_Archive
0:02:45 (MLM) MATLAB 0:02:45 (MLM) Updating feature TMW_Archive
0:02:45 (MLM) Updating feature MATLAB
4:15:19 (lmgrd) TIMESTAMP 4/15/2008
10:15:19 (lmgrd) TIMESTAMP 4/16/2008
Generating a detailed debug log file on UNIX or Linux
On UNIX and Linux, you can generate a debug log file, named lmdebug.log, by running the lmdebug script in $MATLAB/etc. This log file will contain information that is useful for debugging FLEXnet issues.
Section 10: What Does "License Manager Error -X" Mean? How Can I Fix This Problem?
Visit the support site for information on a particular license manager errors.
A complete list of FLEXnet error codes can be found in the FLEXnet End User's Guide.
Section 11: How Can I Set Up MATLAB to Run With My Existing FLEXnet Installation?
If you have another application that uses the FLEXlm License Manager, you can set up MATLAB to use the existing FLEXnet lmgrd daemon. See support tech solution 1-16RGP Is it possible to run the MATLAB license manager on a computer with other FLEXnet applications? for step-by-step instructions on how to setup MATLAB to share the existing lmgrd daemon.
Section 12: Where Can I Find More Information About FLEXnet?
For more detailed information about FLEXnet, visit the Flexera's Software Web site, and review the FLEXnet End User's Guide.