License File Basics

> ## Chapter 2

> ## License File Basics

> The license file contains information required by FLEXlm to manage licenses for a FLEXlm-licensed application. This information includes:

> - License server names and hostids
> - Vendor names and paths to vendor daemon executables
> - Feature information

> In general, the license file, or a copy of it, must be accessible to every machine that runs a FLEXlm-licensed application, and to each machine designated as a license server.

> ### 2.1 Specifying Location of the License File

> Software vendors often recommend a specific location for your license file. If you are running the application on multiple machines, you have these options for making your licenses available on all the machines:

> - Place the license file in a partition which is available to all machines in the network that need the license file.
> - Copy the license file to all of the machines where it is needed.
> - Set the `LM_LICENSE_FILE` or VENDOR_LICENSE_FILE (where VENDOR is the vendor daemon name) environment variable to `port``@``host`, where `host` and `port` come from the SERVER line in the license file. Alternatively, if the license file SERVER line specifies a TCP/IP port in the default port range (27000-27009) or does not specify a port (thereby allowing the system to choose one from the default range), use the shortcut specification, `@``host`. Table 2-1 shows some examples of LM_LICENSE_FILE and VENDOR_LICENSE_FILE environment variable settings.

> Table 2-1: Environment Variable Specification Examples
> SERVER Line | LM_LICENSE_FILE or VENDOR_LICENSE_FILE Setting
> --- | ---

> `SERVER myserver 17007ea8 \
> 40000`
> where:
> - `host` = `myserver`
> - `port` = `40000`

> `40000@myserver`

> `SERVER myserver 17007ea8 \
> 27001`
> where:
> - `host` = `myserver`
> - `port` = `27001`, within the default range

> `@myserver`

> `SERVER myserver 17007ea8`
> where:
> - `host` = `myserver`
> - `port` = none specified, uses a default TCP/IP port number in the range of 27000-27009

> `@myserver`

> - On Windows, if the application cannot find the license file, the user is presented with a dialog that asks the user to specify the license file location, the license server, or license fulfillment from the internet.

> Since the vendor daemon keeps track of license usage, and since the license file contains encrypted data to protect it against modification, you may move and copy the license file as much as necessary.

> For counted licenses, no matter which option you choose, you must first copy `lmgrd` and the vendor daemon to a location accessible by the licensed application.

> #### 2.1.1 Setting the Path with an Environment Variable

> Most applications specify a location where they expect to find the license file and install it automatically. However, you can change the license file location by setting the `LM_LICENSE_FILE` environment variable to a `license_file_list`. Wherever `license_file_list` is specified it can consist of the following components:

> - the full path to the license file
> - a directory containing one or more license files with a `.lic` extension
> - a `port``@``host` setting, where `port` and `host` are the TCP/IP port number and host name from the SERVER line in the license file. Alternatively, use the shortcut specification, `@``host`, if the license file SERVER line uses a default TCP/IP port or specifies a port in the default port range (27000-27009)

> Applications accept an environment variable (or Windows Registry) named `VENDOR``_LICENSE_FILE`, where `VENDOR` is the vendor daemon name, e.g., `GSI_LICENSE_FILE`. This environment variable’s scope is limited to just those applications from vendor `VENDOR`.

> With `lmgrd` and `lmutil` (`lmstat`, `lmdown`, etc.), the `-c` option overrides the setting of the `LM_LICENSE_FILE` environment variable.

> > Note: Some applications do not recognize the `LM_LICENSE_FILE` environment variable. FLEXlm-enabled Java applications, in particular, do not recognize it.

> ##### See Also

> - Section 3.5, “Managing Multiple License Files,” for more information about `LM_LICENSE_FILE`.
> - Appendix D, “FLEXlm Environment Variables”

> ### FLEXlm Version Notes

> - Default TCP/IP port number range introduced in v6.0 of `lmgrd`.
> - License file location dialog introduced in v6.0 of the FLEXlm client library.

> ### 2.2 License File Format Overview

> License files usually begin with a SERVER line (or three lines for three-server redundant servers) followed by one or more VENDOR lines, followed by one or more FEATURE or INCREMENT lines. In some cases the license file requires no SERVER line and no VENDOR line.

> You can modify these elements in the license file:

> - Host names on the SERVER line(s)
> - TCP/IP port numbers on the SERVER line(s)
> - Paths on the VENDOR line(s)
> - Options file paths on the VENDOR line(s)
> - Optional TCP/IP port numbers on the VENDOR line(s) (for firewall support only)
> - USE_SERVER line
> - Values in `keyword=value` pairs on FEATURE lines, if `keyword` is specified in lowercase

> ##### See Also

> - Section 4.3, “Redundant License Servers”
> - Section 4.4, “Counted vs. Uncounted Licenses,”
> - Appendix B, “License File Format,” for details on each one of these components.

> ### FLEXlm Version Notes

> - USE_SERVER introduced in the v5.0 FLEXlm client library.
> - VENDOR lines are known as DAEMON lines in the pre-v6.0 `lmgrd` and vendor daemon.

> ### 2.3 Types of License Files

> License files are created by the software vendor. License files specify floating (concurrent) usage, node-locked (both counted and uncounted), or any combination of floating, counted, and uncounted.

> #### 2.3.1 Floating (Concurrent) Licenses

> A floating license means anyone on the network can use the FLEXlm-licensed application, up to the limit specified in the license file (also referred to as concurrent usage or network licensing). Floating licenses have no hostids on the individual FEATURE lines. Floating licenses requires an `lmgrd` and a vendor daemon to be running to count the concurrent usage of the licenses.

> An example of a license file that provides floating licenses is:

> SERVER lulu 17007ea8
> VENDOR sampled
> FEATURE f1 sampled 1.00 1-jan-2005 2 `SIGN=``signature1
> `FEATURE f2 sampled 1.00 1-jan-2005 6 SIGN=`signature2
> `FEATURE f3 sampled 1.00 1-jan-2005 1 SIGN=`signature3`

> This license file specifies that two licenses for feature “f1,” six licenses for feature “f2,” and one license for feature “f3” are available anywhere on the network that can access the license server “lulu.” `lmgrd` uses one of the default FLEXlm ports.

> #### 2.3.2 Node-Locked Licenses

> Node-locking means the licensed software can only be used on one machine or a set of machines. A node-locked license has a hostid on any FEATURE line that is node-locked to a particular host. There are two types of node-locked licenses; uncounted and counted.

> If the number of licenses is set to 0 (or `uncounted`), then the license is uncounted and unlimited use is permitted on the specified machine. This configuration does not require an `lmgrd` or a vendor daemon because it is not going to count the concurrent usage of the features.

> The following license file allows unlimited usage of feature “f1” on the machines with hostids of “17007ea8” and “1700ab12”:

> FEATURE f1 sampled 1.000 1-jan-2005 uncounted SIGN=`signature1 \
> ` HOSTID=17007ea8
> FEATURE f1 sampled 1.000 1-jan-2005 uncounted SIGN=`signature2` \
> HOSTID=1700ab12

> Alternately, these two FEATURE lines could have been issued by your software vendor with a hostid list:

> FEATURE f1 sampled 1.000 1-jan-2005 uncounted SIGN=`signature` \
> HOSTID="17007ea8 1700ab12"

> If these were the only FEATURE lines in this license file, no `lmgrd` daemon is necessary and you do not need to start one.

> The following license file provides three licenses for feature “f1”, locked to the machine with hostid “1300ab43.” Since the license server and licenses are locked to the same machine, the daemons run on the same machine that runs the licensed application.

> SERVER lulu 1300ab43 1700
> VENDOR sampled /etc/sampled
> FEATURE f1 sampled 1.00 1-jan-2005 3 SIGN=`signature \
> ` HOSTID=1300ab43

> #### 2.3.3 Mixed Node-Locked and Floating Licenses

> Uncounted node-locked and concurrent usage licenses can be mixed in the same license file.

> The following license file allows unlimited use of feature “f1” on machines “17007ea8” and “1700ab12,” while allowing two other licenses for feature “f1” to be used anywhere else on the network:

> SERVER lulu 17001234 1700
> VENDOR sampled C:\flexlm\sampled.exe
> FEATURE f1 sampled 1.00 1-jan-2005 uncounted SIGN=signature1 \
> HOSTID=`17007ea8
> `FEATURE f1 sampled 1.00 1-jan-2005 uncounted SIGN=signature2 \
> HOSTID=`1700ab12
> `FEATURE f1 sampled 1.00 1-jan-2005 2 SIGN=signature3

> This configuration requires an `lmgrd` and a vendor daemon because the concurrent usage of the two licenses on the third FEATURE line is counted.

FLEXlm End Users Guide
July 2003