White dot for spacing only
The Dice Project

FlexLM Licence Servers

flexlm.html,v 1.10 2014/02/19 14:52:56 gdutton Exp


This page covers information general to all of our flexlm services, which presently includes matlab, SIMICS and Maple (version 12 onwards) amongst others.

FlexLM Licence Manager

All our License servers which use FlexLM take advantage of the common lcfg-flexlm component to manage all aspects of its license service.


Additional LCFG configuration is required to run a licence server. For a generic FlexLM license server, you may add:

  #include <dice/options/flexlm-server.h>

and add resources (to profile or new, inheriting header) as appropriate.

All the necessary configuration and packages for a running flexlm instance are included in the options header file, but of course a license and hosting details will be required to make use of them.

Automatic MAC address assignment

Most licences are MAC locked, and their associated MAC address is defined in the resource id_licencetag. If your licence permits, you can use the FlexLM component's built-in spoofing to assign the appropriate MAC address virtually to each licence manager. This allows you to stack multiple FlexLM instances on one machine. This is done by setting:


at the head of your licence server's profile (due to header ordering it's important that this is done before the first inclusion of flexlm-server.h.

Stopping and Starting

To start and stop the licence servers just use the normal component methods, ie.

  om flexlm start
  om flexlm stop

In addition there are some useful flexlm commands that can be used directly on any host with 'lmutil' (part of the flexlm installation):

  # shows overview information
  lmutil lmstat -c /usr/lib/lcfg/conf/flexlm/['hosting' entry name] 
  # shows status of licence manager and all licenses in use
  lmutil lmstat -a -c /usr/lib/lcfg/conf/flexlm/[name] 
  # manually stops flexlm on that host, not recommended
  lmutil lmdown
  # manually starts flexlm on that host, not recommended  
  lmutil lmstart

Finally, the lcfg-flexlm package provides the shortcut command lmautostat, which runs lmutil lmstat against every LCFG-configured flexlm licence file.

License Administration

Practices for adding or removing licences are ultimately service-specific, but all rely on shipping a licence file to the server, usually in an RPM, and pointing the flexlm.license_<tag> towards the installed file.

Once the server can see a licence file, it will automatically begin serving any requested licences to any reachable clients. To restrict this, services need to define an options file; this can be done using the flexlm.options resources.

For example, to reserve ten licences from the MATLAB feature with unique key 1234567890 to three servers, you could add the following:

  !flexlm.options_mylic        mADD(grp excl)
  flexlm.option_mylic_grp      HOST_GROUP computeservers myserver.<%profile.domain%> another.<%profile.domain%> lastserver.<%profile.domain%>
  flexlm.option_mylic_excl     RESERVE 10 "MATLAB KEY=1234567890" HOST_GROUP computeservers

Full details on configuration, along with license administration strategies, are available in the lcfg-flexlm manual page and its linked documents, such as the FlexNET Licensing End-User Guide.


The service-specific server logs are held in /var/tmp/flexlm.log.[service] and are rotated weekly. You can use them to see that the server has started up correctly, connected to the other servers and that licences are being checked out.

Usage monitor

Further to the core status tools provided by lmutil, and regardless of the number of hosted licences or features, our servers provide license usage information via the web. These pages are generated by the flexlm component on a configurable schedule (usually every minute) and are by default restricted to DICE users only. They are provided at:


for example, our Matlab research server usage can be monitored at http://matlab-research.inf.ed.ac.uk:1881/usage-research.html. This provides detailed statistics on user-license allocation as well as an overview of checked-out licenses per feature or toolbox.

The status page also provides implicit confirmation that the licensing server is running: a status page which lists no features or toolboxes is likely to be down for some reason. This information (augmented for machine-readibility) forms the basis of our FlexLM Nagios monitoring.

Nagios Monitoring

FlexLM servers can be configured to allow monitoring through a combination of simple port checks and a customised Nagios plugin which uses the output of the usage monitor (for this reason, the usage monitor is required for useful nagios monitoring). The following metrics are checked:

Please check the existing monitored services such as Matlab for details, and consult the lcfg-flexlm manual page for the resources necessary to monitor a FlexLM server.

Licence Reservation

It is possible to limit, exclude or reserve individual concurrent sessions, or specific INCREMENT licence keys, for specific users or purchasers. Example resources to achieve this are given in the lcfg-flexlm manual page.

A note about licence restrictions: If an additional licence pool is added to an existing server, restricted to a group of users, its licence count will appear to have been added to the main pool. This will skew the usage monitor's reporting of licence usage, and will prevent the feature from ever appearing "full" to Nagios or the monitor. The workaround for this is to RESERVE the feature for the same number of users as is INCLUDED:

!flexlm.options_daemon1        mADD(grp inc res)
flexlm.option_daemon1_grp      HOST_GROUP specialhosts foo bar baz
/* Specify KEY=xxx to ensure the correct licence is included: for example this licence is for 30 concurrent users. */
flexlm.option_daemon1_inc      INCLUDE "MATLAB KEY=1234567890" HOST_GROUP specialhosts
flexlm.option_daemon1_res      RESERVE 30 "MATLAB KEY=1234567890" HOST_GROUP specialhosts

This ensures the licences are removed from the pool (they show up as a named reservation in the 'users' usage output section).


If the status web page is up-to-date but reporting no features, then the server is probably having trouble starting. On the server, run 'lmautostat' and check for features or errors. Also try 'lmutil lmdiag'. Common errors follow.

"Operation in Progress"
Sometimes this is acceptable; wait one minute or so and check again. If it persists, then a failing server may need to be restarted with om flexlm restart. If the flexlm component detects a running lmgrd process which will not close, it attempts to kill the server on restart. If this fails, check lmdiag and the /var/log/flexlm*.log files for evidence of another process using its port -- the solution then being simply to kill -9 the offending process (lsof can help you here).
"This platform not authorized by license"
Aside from the obvious explanation that the wrong license has been provided, this is most likely due to the source license being formatted incorrectly for processing by the component. The flexlm component takes the licence file as specified by the license_<licname> resource, and adds appropriately-configured SERVER and VENDOR lines to the top of the file. If the source file already contains such lines, the generated result will be incorrect. To guard against this, most of the DICE RPMs which provide licence files contain something along the lines of "grep -v '^\(SERVER\|VENDOR\)' %{SOURCE0} > license.dat".
"unsupported by licensed server"
This probably means that the licences don't match the server you're using, for some definition of "matching". A common reason is that the xxx-flexlm-server.h header has been added to a new server, but its MAC address has not yet been altered to match the licence.

Further Information

Use of the lcfg-flexlm component is documented extensively in the man page accompanying the component, and is recommended reading.

 : Units : Research_and_teaching : Documentation 

Mini Informatics Logo - Link to Main Informatics Page
Please contact us with any comments or corrections.
Unless explicitly stated otherwise, all material is copyright The University of Edinburgh
Spacing Line