FLEXlm is a network-wide floating licensing package that allows a software application to be licensed on a concurrent-usage, as well as on a per-computer, basis.
With FLEXlm, you, the application developer, can restrict the use of your software packages to:
A single specified computer.
A specified number of users on a single computer.
A specified number of users in a network containing one or more computer systems.
FLEXlm is available on UNIX, VMS, Windows (clients only), and Windows NT systems. FLEXlm features include:
Restriction of software packages to specified computers and users.
Operation in a heterogeneous network of supported computer systems.
License management on redundant server hosts for improved license availability due to hardware failure.
Optional license expiration dates.
Counted and uncounted license usage.
Support for demo software.
Independent features from one or multiple vendors with independent vendor security codes.
A vendor-definable field for each application feature.
Transparent reconnection of applications when their daemon process becomes unavailable, including conditions of license server node failure.
Ease of configuration with a single license file per network.
Configuration controls for System Administrators.
Administration tools for System Administrators.
The following terms are used as defined to describe FLEXlm concepts and software components.
The four main components in FLEXlm are:
The client library (embedded in the license-managed application)
lmgrd, the license daemon
The vendor daemon(s)
Vendor and end-user license administration tools
A single license file supports all components.
The components of a typical configuration of FLEXlm will consist of:
The license file
lmgrd
A single vendor daemon
An application program
The license file default is /usr/local/flexlm/licenses/license.dat (or C:\FLEXLM\LICENSE.DAT for Windows and Windows NT systems, SYS$COMMON:[SYSMGR]flexlm.dat for VMS systems). This default can be overridden by the developer via calling lc_set_attr(), or by the end-user setting the environment variable LM_LICENSE_FILE (logical name LM_LICENSE_FILE on VMS) to the pathname of the file. If at all possible, Globetrotter Software recommends keeping the license file in the standard location and allowing the end-user to move it by setting the LM_LICENSE_FILE environment variable.
The end-user installs lmgrd and the vendor daemon. If no redundancy is required, then these daemons run on one server node. If the network has only a single file server which contains all user files, then there is no advantage in having redundant daemons. If redundancy is desired, then the daemon would be installed on three server nodes. FLEXlm supports three server nodes operating as a single “logical” server node on UNIX and Windows/NT systems.
Once the license file and the daemons are in place, all that is required is to start the daemon when the machine boots. The daemon can be most conveniently started in
/etc/rc.boot, /etc/rc.local, /etc/rc, /sbin/rc3.d or /etc/rc3.d, depending on the operating system.
For Windows NT systems, lmgrd can be installed as a system service and started automatically when the system boots.
![]() | Note: FLEXlm does not require the use of privileged sockets, therefore any user can start the FLEXlm daemons. |
If the license file is in the standard location (or the end-user has LM_LICENSE_FILE set properly) FLEXlm use is transparent to the end-user once the administrator has started the FLEXlm daemons.
Configurable parameters in FLEXlm include:
Number of server nodes, or server-less (uncounted) licenses.
License file location.
Type and frequency of checking for daemon failures in the client software.
Reconnection parameters (in the event of daemon failure).
The following sections describe daemon and client configuration trade-offs.
If all the end-user data is on a single file server, then there is no need for redundant servers, and Globetrotter Software recommends the use of a single server node for the FLEXlm daemons. If the end-user's data is split among two or more server nodes and work is still possible when one of these nodes goes down or off the network, then multiple server nodes can be employed. In all cases, an effort should be made to 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 major trade-off in the client configuration options is the decision to terminate the application or let it continue running when it loses its connection to the daemon, which can indicate attempted theft. This policy decision must be made by each application vendor; FLEXlm can adapt to the required strategy.
The parameters available to implement the required policy are:
To implement a lenient policy, the number of retries can be set high, and the result of retry failure can be the display of a warning message with further retries at fixed intervals.
If a stricter policy is required, then the number of retries can be set low, with a relatively short retry interval, and termination of the application can be enforced. Other alternatives could include: limiting the functionality (disable printing for example) or slowing the performance of the product.
In both cases, the time while FLEXlm is retrying to connect to a daemon could be used to save files and checkpoint the application. If checkpointing were done and no new daemon connection were possible at the end of the interval, the application would be ready to exit.
Other client trade-offs concern the location of the license file and the appropriate selection of licensable features. In general, Globetrotter Software recommends that you leave the license file location at /usr/local/flexlm/licenses/license.dat (or C:\FLEXLM\LICENSE.DAT for Windows and Windows NT systems, and SYS$MANGER:FLEXLM.DAT for VMS systems), and let the end-user override this path, if necessary, as described in Chapter 12, “End-User License Administration.”
![]() | Note: Globetrotter Software recommends that you do not override the use of the LM_LICENSE_FILE environment variable within your code. |
The application program interfaces to FLEXlm via a set of routines that checkout and checkin copies of the licensed feature(s). Two primary routines perform checkout and checkin respectively. Additional routines are provided to set defaults, provide a list of users of the feature and provide other miscellaneous functions.
The application program is a client of FLEXlm. The routines to manage licenses are all contained in the FLEXlm client library liblmgr.a (lmgr.dll for Windows or lmgr32.dll for Windows NT and Win32s).
The include file lm_client.h contains all the symbolic definitions required for most calls. lm_code.h contains the vendor's encryption seeds and FLEXlm vendor key values. lm_attr.h contains the definitions used in the lc_set_attr() and lc_get_attr() calls.
FLEXlm supports the Software License Working Group API. See “Software License Working Group” for more information.
FLEXlm supports License Service Application Programming Interface (LSAPI). See “LSAPI v1.1”.
The following is an example of an application with calls to FLEXlm. The essential macros and functions are: LM_CODE(), lc_init(), lc_checkout(), lc_checkin().
All FLEXlm kits are the same; a set of software “keys” distributed by Globetrotter Software determines if the kit is either a full-function or a demo kit. All demo kits have expiration dates and they also have a number of features disabled.
Specifically, FLEXlm demo kits have the following features disabled: