Skip to Main Content Skip to Search
Home |   United Kingdom  Choose Country  |  Contact Us  |  Cart Store 
Create Account | Log In
Products & Services Industries Academia Support User Community Company

 

Product Support

1303 - FLEXnet Guide



Introduction

  1. What Is FLEXnet? Who Makes FLEXnet?
  2. How Does FLEXnet Work?

Administration of FLEXnet

  1. Is There a List of FLEXnet Utilities or Scripts?
  2. Is There a GUI Available for License Administration? What is the LMTOOLS Executable on Windows?
  3. How Do I Monitor the Usage (Number of Users) of FLEXnet Licenses or Keys for MATLAB and the Toolboxes?
  4. Can I Have Redundant Servers for FLEXnet? How Do I Set This Up?
  5. Can I Reserve or Deny Product Licenses to a Particular User or Group of Users? What Is a Local Options File?
  6. Can I Run Multiple MATLAB License Files From One Server?

Troubleshooting FLEXnet

  1. What Is A License or Debug Log File? How Do I Read It?
  2. What Does "License Manager Error -X" Mean? How Can I Fix This Problem?
  3. How Can I Set Up MATLAB to Run With My Existing FLEXnet Installation?
  4. 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.

Acresso Software Inc. makes FLEXnet. For more detailed information about FLEXnet, visit the Acresso 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:

  1. 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.
  2. 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.
  3. lmgrd determines which machine and port correspond to the master vendor daemon and sends that information back to the client.
  4. The client establishes a connection with the specified vendor daemon and sends a request for a license.
  5. The vendor daemon checks to see if any licenses are available and sends a grant or denial message back to the client.
  6. 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 Acresso 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\flexlm directory (where $MATLAB is the root MATLAB directory). 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 $MATLAB\flexlm directory (where $MATLAB is the root MATLAB directory). The GUI uses buttons to provide access to the same set of tools as the lmutil script (also located in $MATLAB\flexlm) 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. 

lmtools.exe displays the same information as if you had entered
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:

  1. 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 following command in a DOS shell from the actual license server machine:
    $MATLAB\flexlm\lmutil lmstat -a 

    (where $MATLAB is the root MATLAB directory)

    or use the lmtools GUI, lmtools.exe, found in $MATLAB\flexlm, 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.

  2. You can purchase an additional reporting utility from Acresso Software

  3. 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.log (for older versions of MATLAB) or lmlog.txt (as of MATLAB 6 and later versions) and is usually located in $MATLAB\flexlm, respectively.
     
    The following is an example of an lmlog.txt from MATLAB R2008a:
    11:40:22 (lmgrd) -----------------------------------------------
    11:40:22 (lmgrd) Please Note:
    11:40:22 (lmgrd)
    11:40:22 (lmgrd) This log is intended for debug purposes only.
    11:40:22 (lmgrd) There are many details in licensing policies
    11:40:22 (lmgrd) that are not reported in the information logged
    11:40:22 (lmgrd) here, so if you use this log file for any kind
    11:40:22 (lmgrd) of usage reporting, you will generally produce
    11:40:22 (lmgrd) incorrect results.
    11:40:22 (lmgrd)
    11:40:22 (lmgrd) -----------------------------------------------
    11:40:22 (lmgrd)
    11:40:22 (lmgrd)
    11:40:22 (lmgrd) Done rereading
    11:40:22 (lmgrd) FLEXnet (v11.4) started on schmidtj (IBM PC)
    (4/11/2008)
    11:40:22 (lmgrd) 1988-2008, Acresso Software Inc. All Rights Reserved
    11:40:22 (lmgrd) US Patents 5,390,297 and 5,671,412.
    11:40:22 (lmgrd) World Wide Web: http://www.acresso.com
    11:40:22 (lmgrd) License file(s): D:\MATLAB6p5\flexlm\license.dat
    11:40:22 (lmgrd) lmgrd tcp-port 27000
    11:40:22 (lmgrd) Starting vendor daemons ...
    11:40:22 (lmgrd) Started MLM (pid 10216)
    11:40:22 (MLM) Server started on schmidtj for: MATLAB
    11:40:22 (MLM) SIMULINK
    11:40:22 (lmgrd) MLM using TCP-port 1253
    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
    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.

Section 6: Can I Have Redundant Servers for FLEXnet? How Do I Set This Up?

Acresso Software recommends the use of a single server node for the FLEXnet daemons. However, FLEXnet supports two methods of redundancy in the $MLM_LICENSE_FILE environment variable:

  • Set of three redundant license servers (three-server redundancy)
  • Redundancy via a license file list

With three-server redundancy, if any two of the three license servers are up and running, the system is functional and hands out its total complement of licenses (two out of three license servers is referred to as a "quorum").

With MLM_LICENSE_FILE list redundancy, each one of a group of license servers serves a subset of the total licenses. The end-user sets MLM_LICENSE_FILE to a list of license files, where each license file refers to one of the license servers. The application then tries each server in the list, in order, until it succeeds or gets to the end of the list.

    Three-server redundancy

    A redundant server setup allows work to continue after one of the three servers goes down or becomes disconnected from the network. Select stable systems as server nodes; in other words, do not pick systems that are frequently rebooted or shut down for one reason or another. The three server nodes can be any supported server node; they do not have to be the same architecture or operating system, but it is recommended.
     
    The three-server redundant servers should be on the same subnet and also have excellent communication. Often this means that the three servers should be located physically close to each other. This form of redundancy requires that the servers exchange heartbeats periodically, and poor communication can cause poor performance. You should never configure redundant servers with slow communication or dial-up links..
     
    In this example, with servers pooh, piglet, and rabbit, the license file looks like this:
    SERVER pooh 55419ab7 1705
    SERVER piglet 554251b8 1705
    SERVER rabbit 52006ac1 1705
    DAEMON MLM /usr/local/matlab/etc/lm_matlab
    INCREMENT f1 MLM 19 01-jan-99 2 26C7DD9CD665B8270186 ""
    INCREMENT f2 MLM 19 01-jan-99 2 0739D2F78CE46C57041D "

    Note that the license file must have three SERVER lines, one for each hostid with which the license file was created.  This file must be located on each of the servers, pooh, piglet, and rabbit..
     

    Redundancy via license file list in $MLM_LICENSE_FILE

    This is best explained with an example. If 10 licenses are desired for both feature 1 and feature 2 (f1 and f2), the software vendor would issue two sets of licenses with a count of 5 for each of f1 and f2. The server nodes (unlike three-server redundancy) can be physically distant. The license files would look like this:.
     
    License 1 for Chicago:.
    SERVER chicago 17007ea8 1700
    DAEMON MLM /usr/local/matlab/etc/lm_matlab
    INCREMENT f1 MLM 19 01-jan-99 5 26C7DD9CD665B8270186 ""
    INCREMENT f2 MLM 19 01-jan-99 5 0739D2F78CE46C57041D ""
    License 2 for Tokyo:
    SERVER tokyo 17007ea8 1700
    DAEMON MLM /usr/local/matlab/etc/lm_matlab
    INCREMENT f1 MLM 19 01-jan-99 5 16BE40E1DAEEEDA8798D ""
    INCREMENT f2 MLM 19 01-jan-99 5 6DB6F3E40E61885712DF ""

The user in Chicago could set LM_LICENSE_FILE to

1700@chicago:1700@tokyo

while the user in Tokyo could set LM_LICENSE_FILE to

1700@tokyo:1700@chicago

The application attempts the first server in the list, and if that fails for any reason, it tries the second server.

Note: Click here for more information regarding the setup of redundant servers

Section 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. These settings are also discussed in the FLEXnet End User's Guide.

Section 8: Can I Run Multiple MATLAB License Files From One Server?

Please see the related solution for information on running multiple MATLAB license files from one server.

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\flexlm (where $MATLAB is the root MATLAB directory) 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 this solution 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 Acresso Software Web site, and review the FLEXnet End User's Guide.

Contact support
E-mail this page
Print this page