Table of Contents * Index * Previous Chapter * Next Chapter

FLEXlm End User Manual: Chapter 2 The License File

Chapter 2 The License File

The license file contains all site-specific information required by FLEXlm. This information includes:

In general, the license file, or a copy of it, must be accessible to every machine that runs a FLEXlm-licensed application, and each machine designated as a license server. Before you can use the application you have to start the license manager daemon (lmgrd) using the following syntax:

lmgrd [-c license_file_path] (Unix and OS/2)
lmgrd -app [-c license_file_path] (Windows/NT)

-c license_file_path
full pathname to the license file. Otherwise, LM_LICENSE_FILE is used, or the default location: /usr/local/flexlm/licenses/license.dat (Unix) or C:\flexlm\license.dat (Windows).

On VMS and Netware systems there is no lmgrd and the vendor daemon is run directly.

2.1 Specifying Location of the License File

If your software vendor recommends a specific location for your license file, or if the default is not practical for you, use one of the following methods to put the license file in another location:

If you are running the application on multiple nodes, you have three options for making your license file available on all the machines:

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.

No matter which option you choose, you must first install lmgrd (on Unix and Windows/NT systems) and the vendor daemon.

With a FLEXlm v6 (or later) vendor daemon and lmgrd, the license path can be a list of files, separated by colons on Unix, or semi-colons on Windows. If there is a directory in this list, all files named *.lic in that directory are used.

You can only start lmgrd on the server node specified in the license file.

If you are running redundant servers, you should have separate copies of the license file (as well as the binaries for lmgrd and the vendor daemons) on each server node. If you do not do this, you lose all the advantages of having redundant servers, since the file server holding these files becomes a single point of failure.

2.1.1 Setting the Path to the License File at Start-Up (Unix)

To start the license manager daemon (lmgrd) execute a command similar to the following.

% lmgrd_path -c license_file_path >& log_path &
$ nohup lmgrd_path -c license_file_path > log_path 2>&1 &

On Unix, edit the appropriate boot script, which may be /etc/rc.boot, /etc/rc.local, /etc/rc2.d/Sxxx, /sbin/rc2.d/Sxxxx, etc. Remember that these scripts are run in /bin/sh, so do not use the csh `>&' redirection syntax.

Each Unix operating system can have some quirks in doing this, but the following script has been successfully tested for HP700 systems. See the notes following for a full explanation.

	/bin/su daniel -c 'echo starting lmgrd > \
		/home/flexlm/v5.12/hp700_u9/boot.log'
	
	/bin/nohup /bin/su daniel -c 'umask 022; \
		/home/flexlm/v5.12/hp700_u9/lmgrd -c \
		/home/flexlm/v5.12/hp700_u9/license.dat >> \
		/home/flexlm/v5.12/hp700_u9/boot.log'

	/bin/su daniel -c 'echo sleep 5 >> \
		/home/flexlm/v5.12/hp700_u9/boot.log'
	/bin/sleep 5
 
	/bin/su daniel -c 'echo lmdiag >>\
		/home/flexlm/v5.12/hp700_u9/boot.log'

	/bin/su daniel -c '/home/flexlm/v5.12/hp700_u9/lmdiag -n -c\
		/home/flexlm/v5.12/hp700_u9/license.dat >> \
		/home/flexlm/v5.12/hp700_u9/boot.log'
	/bin/su daniel -c 'echo exiting >>\
		/home/flexlm/v5.12/hp700_u9/boot.log'

Please note the following about how this script was written:

On IBM RS6000 systems, /etc/rc cannot be used, because TCP/IP is not installed when this script is run. Instead, /etc/inittab must be used. Add a line like this to /etc/inittab after the lines which start networking: rclocal:2:wait:/etc/rc.local > /dev/console 2>&1

This will not start the daemon until you reboot your license server machine.

2.1.2 Setting the Path to the License File at Start-Up (Windows)

This is set with the FLEXlm Control Panel. See Section 6.13.2, `The FLEXlm Control Panel,' on page 49.

2.1.3 Setting the Path with an Environment Variable

Use the environment variable LM_LICENSE_FILE to set the location of the license file. For example in the C shell:

% setenv LM_LICENSE_FILE license_file_path

In the Korn and Bourne shells:

# LM_LICENSE_FILE=license_file_path
# export LM_LICENSE_FILE

On Windows 3.1 and 95, add the following line to C:\autoexec.bat:

SET LM_LICENSE_FILE=license_file_path

On Windows NT, use the System Control Panel applet to change the global environment, adding LM_LICENSE_FILE to license_file_path

license_file_path
full pathname to the license file. This can also be a port@host setting, where port and host are the port number and hostnames from the SERVER line in the license file.

In FLEXlm v6.0, applications will accept an environment variable (or Windows Registry) named `VENDOR_LICENSE_FILE', where VENDOR is the vendor-daemon name, e.g., GSI_LICENSE_FILE.

The `-c' option overrides the setting of the LM_LICENSE_FILE environment variable for lmgrd and other FLEXlm utilities like lmstat and lmdown. See Section 3.1.3, `Using Separate License Files on the Same Server Node,' on page 23 for more information about LM_LICENSE_FILE.

Some applications do not recognize the LM_LICENSE_FILE environment variable.

2.2 License File Format

License files usually begin with a SERVER line (or three lines for redundant servers) followed by one or more DAEMON lines, followed by one or more FEATURE or INCREMENT lines. In some cases the license file requires no SERVER line and no DAEMON line. See Section 4.4, `Counted vs. Uncounted Licenses,' on page 29, for more information. Since FLEXlm v6.0, the DAEMON line can be called VENDOR. Wherever DAEMON appears, VENDOR can be used, if the lmgrd and vendor-daemon are both >= FLEXlm v6.0.

You can modify these data items in the license file:

Everything else is used to compute the license key, and should be entered exactly as supplied by your software vendor. All data in the license file is case sensitive, unless otherwise indicated.

In the following sections, options modifiable by the license administrator are italicized.

2.2.1 SERVER Lines

The SERVER line specifies the node name and hostid of the license server, and the port number of the license manager daemon (lmgrd). Normally a license file has one SERVER line. Three SERVER lines mean that you are using redundant servers. The absence of a SERVER line means every FEATURE or INCREMENT line in the license file is uncounted. For more information about uncounted features, see Section 2.2.4, `FEATURE or INCREMENT Lines,' on page 13. License administrators do not have the option of deleting SERVER lines from a license file because the hostids from the SERVER lines are computed into the license keys on every FEATURE and INCREMENT line. For more information about redundant servers, see Chapter 4, `Selecting Server Nodes' on page 25.

The format of the SERVER line is:

SERVER nodename id port-number

nodename (or IP-address)
The system hostname. String returned by the Unix hostname or uname -n command. On NT, ipconfig /all; on Win95, winipcfg /all return the hostname. If the application uses FLEXlm v5 or higher, this can be an IP-address (in nnn.nnn.nnn.nnn format).
id
Usually the string returned by the lmhostid command. This can only be changed by your software supplier.
port-number
TCP port number to use. A valid number is any unused port number between 0 and 64000. On Unix choose a port >1024, since <1024 are privileged port numbers.

Example:

SERVER enterprise 0122345 21987

2.2.2 DAEMON (or VENDOR) Lines

The DAEMON line specifies the daemon name and path. lmgrd uses this line to start the vendor daemons, and the vendor daemon reads it to find the options file. The format of the DAEMON line is shown below.

Since FLEXlm v6.0, the DAEMON line can be called VENDOR. VENDOR can be used if the lmgrd and vendor-daemon are both at least FLEXlm v6.0.

{DAEMON|VENDOR} daemon_name [daemon_path] [[options=]options_path]\
	[[port=]portnum]

daemon_name
name of the vendor daemon used to serve some feature(s) in the file. This name cannot be changed by the administrator.
daemon_path
pathname to the executable for this daemon. Generally the license administrator is free to install the daemon in any directory. (It is recommended however, that it be installed in a local directory on the license server node.) If the lmgrd and vendor-daemon are >= FLEXlm v6.0, this path is optional. If left out, lmgrd will look for the vendor-daemon binary in the current directory, the $PATH list, or in the directory where lmgrd is located. If the path is blank, then the options= and port= strings are required if options or port number are specified.
options_path
full pathname of the end-user specified options file for this daemon. (See Chapter 5, `The Options File' on page 31.) FLEXlm does not require an options file. The keyword `options=' requires a v5+ vendor daemon. If the vendor daemon is FLEXlm v6 or later, the options file need not be specified on this line. If it is called vendor.opt (where vendor is the vendor-daemon name) and located in the same directory as the license file, the vendor daemon will automatically find and use it.
portnum
Vendor daemon port number. NOTE: This is for firewall support only, and is otherwise not recommended. This requires a v5+ lmgrd.

Examples:

v6.0:

VENDOR sampled

pre-v6.0:

DAEMON sampled /usr/local/sampled /usr/local/flexlm/licenses/sampled.opt 

Versions of FLEXlm prior to v3.0 did not support the line continuation character (`\'). Previous versions required that each line in the license file fit on a single line.

2.2.3 USE_SERVER line (v5+ only)

USE_SERVER takes no arguments, and has no impact on the server. When the application sees USE_SERVER, it ignores everything in the license file except preceding SERVER lines, and the checkout validation occurs at the vendor daemon. USE_SERVER is recommended since it improves performance when a license server is used. For uncounted features, USE_SERVER can be used to force logging of usage by the daemons.

2.2.4 FEATURE or INCREMENT Lines

A FEATURE line describes the license to use a product. An INCREMENT line can be used in place of a FEATURE line, as well as to `incrementally' add licenses to a prior FEATURE or INCREMENT line in the license file.

Only the first FEATURE line for a given feature will be processed by the vendor daemon. If you want to have additional copies of the same feature (for example, to have multiple node locked counted features), then you must use multiple INCREMENT lines. INCREMENT lines form license groups based on the feature name, version, and node lock hostid. If the feature name, version, and node lock hostid (and optionally, the vendor string, if the vendor specified this) match a prior INCREMENT or FEATURE line, the new number of licenses is added to the old number. If any of the three do not match, a new group of licenses is created in the vendor daemon, and this group is counted independently from others with the same feature name (called a `license pool'). INCREMENT is not available for pre-v2.61 FLEXlm clients or servers. A FEATURE line does not give an additional number of licenses, whereas an INCREMENT line ALWAYS gives an additional number of licenses.

There is a rarely used option in FLEXlm which causes FEATURE lines to function as INCREMENT lines. This option is called ls_use_all_feature_lines. You will have to ask your vendor if they use this option. If they do, then all FEATURE lines behave exactly as INCREMENT lines.

A FEATURE line placed after another FEATURE or INCREMENT line will be ignored (unless ls_use_all_feature_lines is set).

The format for the FEATURE line changed in FLEXlm v3.0 and FLEXlm v6.0. The older formats are understood by new clients and servers, but the new formats are more flexible.

v2 format:

FEATURE|INCREMENT name vendor ver expdate #lic key `vendor_str' [hostid]

v3+ format:

FEATURE|INCREMENT name vendor version exp_date #lic key \
[HOSTID=hostid][VENDOR_STRING='vendor-string'] \ 
[vendor_info='...'] [dist_info='...'] [user_info='...'] \
[asset_info='...'] [ISSUER='...'] [NOTICE='...'] [ck=nnn] \
[OVERDRAFT=nnn] [DUP_GROUP=NONE|SITE|[UHDV]]

Nothing in a FEATURE/INCREMENT line is editable, except for values in the `name=value' pairs where name is all lowercase.

name
name given to the feature by the vendor.
vendor
name of the vendor daemon; also found in the DAEMON line. The specified daemon serves this feature.
version
version of this feature that is supported by this license.
exp_date
expiration date, for example, 7-may-1996. Note: If the year is 0 (or 00, 000, 0000) then the license never expires. Dates before 2000 can be 2- or 4-digit years. After 2000 they must be 4-digit years. The expiration date is fully year-2000 compliant. FLEXlm v6 (or later) applications only: the keyword `permanent' can be used instead of the date `1-jan-0'.
#lic
number of concurrent licenses for this feature. If the number of users is set to 0, the licenses for this feature are uncounted and no lmgrd is required but a hostid on the FEATURE line is required. See Section 4.4, `Counted vs. Uncounted Licenses,' on page 29. FLEXlm v6 (or later) applications only: the keyword `uncounted' can be used instead of a count of 0.
key
license key for this FEATURE line. Two identical looking FEATURE or INCREMENT lines may have different license keys if the start dates are different.

The following fields are all optional (except for vendor-string in the old format). For optional fields of the `name=value' syntax, if the name is lowercase, it can be modified and the license will remain valid.

`vendor_string'
vendor-defined string, enclosed in double quotes. This string can contain any characters except a quote.
hostid
string returned by lmhostid. Used only if the feature is to be bound to a particular host, whether its use is counted or not. (Numeric hostids are case insensitive). See Appendix A, `Hostids for FLEXlm-Supported Machines' for more information.
DUP_GROUP=...
Duplicate Grouping parameter can be specified in the license in FLEXlm v4.0 and later. The syntax is:
              			DUP_GROUP=NONE|SITE|[UHDV]
        				U = DUP_USER
        				H = DUP_HOST
        				D = DUP_DISPLAY
        				V = DUP_VENDOR_DEF
Any combination of UHDV is allowed, and the DUP_MASK is the OR of the combination. For example `DUP_GROUP=UHD' means the duplicate grouping is (DUP_USER|DUP_HOST|DUP_DISPLAY), so for a user on the same host and display, additional uses of a feature do not consume additional licenses.
HOSTID=hostid
Same as hostid above, but in the name=value pair syntax (FLEXlm v3.0 and later).
HOST_BASED[=n]
Hostnames must be specified in INCLUDE statements in the end-user options file, and the number of hosts is limited to #lic, or the number specified in `=n'.
ISSUED=dd-mmm-yyyy
Date issued.
ISSUER='...'
Issuer of the license.
NOTICE='...'
A field for intellectual property notices.
OVERDRAFT=nnn
FLEXlm v4.0 and later. The OVERDRAFT policy allows your vendor to specify a number of additional licenses which users will be allowed to use, in addition to the licenses they have purchased. This allows your users to not be denied service when in a `temporary overdraft' state. Usage above the licensed limit will be reported by the FLEXadmin reporting tool.
PLATFORMS='...'
Usage is limited to the listed platforms. (v5.11+ only).
SN=serial_num
Serial number, used to identify INCREMENT lines.
START=dd-mmm-yyyy
Start-date (FLEXlm v6 or later only)
SUPERSEDE[='f1 f2 ...'
If this appears, all licenses issued before the date specified in ISSUED= are superseded by this line, and become ineffective.
USER_BASED[=n]
Users must be specified in INCLUDE statements in the end-user options file, and the number of users are limited to #lic, or the number specified in `=n'.
VENDOR_STRING='...'
Same as `vendor_string' above, but in name=value pair syntax.

The following attributes can be changed or deleted by end-users. This is indicated by a lowercase name.

asset_info='...'
Additional information provided by the license administrator for asset management.
ck=nnn
A checksum, useful with the lmcksum utility, which will verify that the license has been entered correctly by the end-user.
dist_info='...'
Additional information provided by the software distributor.
user_info='...'
Additional information provided by the license administrator.
vendor_info='...'
Additional information provided by the software vendor.
Examples:
	FEATURE xyz_app xyzd 2.300 31-dec-1997 20 1234567890 `xyz'
	INCREMENT f1 xyzd 1.000 1-jan-0 5 12345678901234567890 		\
		HOSTID=INTERNET=195.186.*.* NOTICE='Licensed to XYZ corp'

2.2.5 FEATURESET Lines

The FEATURESET line is a rarely used line to prevent FEATURE lines from being added to or removed from the license file. The format of the FEATURESET line is shown below.

	FEATURESET daemon_name key

Nothing in a FEATURESET line can be edited. Use the FEATURESET line exactly as it comes from your vendor.

daemon_name
name of the vendor daemon.
key
license key for this FEATURESET line. This key encrypts the keys of all features this daemon supports, so no FEATURE/INCREMENT lines can be removed, added, or rearranged in this license file.

Example:

	FEATURESET sampled 12345678

sampled
name of the vendor daemon
12345678
key generated by the vendor

2.2.6 PACKAGE Lines

The purpose of the PACKAGE line is to support two different licensing needs:

A PACKAGE line, by itself, does not license anything - it requires a matching FEATURE/INCREMENT line to license the whole PACKAGE. A PACKAGE line can be shipped by your software vendor with a product, independent of any licenses. Later, when you purchase a license for that package, one or more corresponding FEATURE/INCREMENT licenses will enable the PACKAGE.

Example:

	PACKAGE pkg_name vendor pkg_version pkg_key COMPONENTS=pkg_list \
			[ OPTIONS=pkg_options ]

pkg_name
name of the PACKAGE. The corresponding FEATURE/INCREMENT line must have the same name.
vendor
name of the vendor daemon that supports this PACKAGE.
pkg_version
version of the PACKAGE. The enabling FEATURE/INCREMENT line must have the same version.
pkg_key
20-character license key.
pkg_list
list of components. The format is:
			feature[:version[:num_lic]]
PACKAGEs must consist of at least one COMPONENT. Version and count are optional, and if left out, their values come from the corresponding FEATURE/INCREMENT line. num_lic is only legal if OPTIONS=SUITE is not set - in this case the resulting number of licenses will be num_lic on the COMPONENTS line multiplied by the number of licenses in the FEATURE/INCREMENT line. Examples:
			COMPONENTS='comp1 comp2 comp3 comp4'
			COMPONENTS='comp1:1.5 comp2 comp3:2.0:4'	
OPTIONS=SUITE
This is what distinguishes a suite PACKAGE from a PACKAGE used to ease distribution.
With OPTIONS=SUITE, the corresponding FEATURE of the same name as the package name is checked out in addition to the component feature being checked out.
If OPTIONS=SUITE is not set, then the corresponding FEATURE of the same name as the package is removed once the PACKAGE is enabled; and it is not checked out when a component feature is checked out.

Examples

	PACKAGE suite xyzd 1.0 3B24B2F508CB697641CC\
                        COMPONENTS='comp1 comp2' OPTIONS=SUITE
	FEATURE suite xyzd 1.0 1-jan-0 5 4193E6ABCCCB1A3970B3

This is a typical SUITE example. There are 2 features: comp1 and comp2, which are each version 1.0, with 5, non-expiring licenses available. When comp1 or comp2 are checked out, `suite' will also be checked out.

	PACKAGE suite xyzd 1.0 2CBF44FCB9C1E825DC5C COMPONENTS='c1:1.5:2\
		c2:3.0:4'
	FEATURE suite xyzd 1.0 1-jan-1999 3 321E78A17EC19AE81A43 SN=123

In this example, the component versions override the FEATURE versions, and the number of licenses available for any component is the product of the 3 licenses for suite and the number of licenses for that component. The result is equivalent to:

	FEATURE c1 xyzd 1.5 1-jan-1999 6 0D3AD5F26BC868D476EC SN=123
	FEATURE c2 xyzd 3.0 1-jan-1999 12 EB16C5AE4A4E0F2961F0 SN=123

With FLEXlm v6 (or later) applications only the PACKAGE lines can be stored in a separate file which need never be edited.

2.2.7 UPGRADE Lines

	UPGRADE name daemon fromversion version exp_date #lic key \
			`string' [hostid] ck=nnn

All the data is the same as for a FEATURE or INCREMENT line, with the addition of the fromversion field. An UPGRADE line removes up to the number of licenses specified from any old version (>= fromversion) and creates a new version with that same number of licenses.

For example, the two lines:

	INCREMENT f1 xyzd 1.000 1-jan-1999 5 9BFAC03164EDB7BC0462 ``
	UPGRADE f1 xyzd 1.000 2.000 1-jan-1999 2 1B9A30316207EC8CC0F7 ``

would result in 3 licenses of v1.0 of f1 and 2 licenses of v2.0 of f1.

UPGRADE will operate on the most recent FEATURE or INCREMENT line (i.e., closest preceding FEATURE or INCREMENT line) with a version number that is >= fromversion, and < version.

Note that UPGRADE does not work for node locked, uncounted licenses before version 6.

2.3 Sample License File

This is an example of a license file for a single vendor with two features.

	SERVER excellent_server		 17007ea8 	1700
	DAEMON xyzd /etc/xyzd
	FEATURE xyz_app1 xyzd 1.000 01-jan-1999 10 1EF890030EABF324""
	FEATURE xyz_app2 xyzd 1.000 01-jan-1999 10 0784561FE98BA073""

The license file above would allow the license server excellent_server with the hostid 17007ea8 to serve 10 floating licenses for xyz_app1 and xyz_app2 to any user on the network.

2.4 Types of License Files

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

2.4.1 Floating (Concurrent) Licenses

A floating license means anyone on the network can use the licensed software, 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 17001234 1700
	DAEMON xyzd /etc/xyzd
	FEATURE f1 xyzd 1.00 1-jan-99 2 key1"" 
	FEATURE f2 xyzd 1.00 1-jan-99 6 key2""
	FEATURE f3 xyzd 1.00 1-jan-99 1 key3"" 

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'.

2.4.2 Node Locked Licenses

Node locking means the licensed software can only be used on one node. 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, then the license is uncounted and unlimited use is permitted on the specified node. 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 nodes with hostids of 12001234 and 1700ab12:

	FEATURE f1 xyzd 1.000 1-jan-99 0 key1"" 12001234
	FEATURE f1 xyzd 1.000 1-jan-99 0 key2"" 1700ab12

Alternately, in FLEXlm v5.0 or later, these 2 FEATURE lines could have been issued by your software vendor with a hostid list:

	FEATURE f1 xyzd 1.000 1-jan-99 0 key HOSTID='12001234 1700ab12'

If these were the only FEATURE lines in this license file, no lmgrd daemon would be necessary and you should not start one.

The following license file allows three licenses for feature `f1' to be run, but only on the node with hostid 1300ab43. (In this case, the daemons should be run on the same node that runs the software, since there is no reason to run the daemons on another node.)

	SERVER lulu 1300ab43 1700
	DAEMON xyzd /etc/xyzy
	FEATURE f1 zyzd 1.00 1-jan-99 3 key"" 1300ab43

2.4.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 nodes 17001111 and 17002222, while allowing two other licenses for feature `f1' to be used anywhere else on the network:

	SERVER lulu 17001234 1700
	DAEMON xyzd C:\flexlm\xyzd.exe
	FEATURE f1 xyzd 1.00 1-jan-1999 0 key1"" 17001111
	FEATURE f1 xyzd 1.00 1-jan-1999 0 key2"" 17002222
	FEATURE f1 xyzd 1.00 1-jan-1999 2 key3""

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

2.5 Decimal Format

The decimal format was introduced in v6. Users with older products can still use the decimal format, but they will require a copy of the v6 lminstall command (which is part of lmutil). The lminstall utility allows the user to type in a decimal line, which is then converted to the readable format, and saved in the specified location. The mixed node-locked floating example above looks as follows in decimal format:

xyzd-f1-01761-55296-37046-04544-00017-06551-18072-57346-18754-136
xyzd-f1-01761-55296-37046-08896-00034-235
xyzd-f1-00481-55296-17590-2

A simple demo license in readable format

	FEATURE f1 xyzd 1.00 1-jan-1999 0 key1 HOSTID=DEMO

converted to decimal:

	xyzd-f1-00737-55296-1825

Note that by default lminstall converts to v6 format. It can convert to a format compatible with older versions by using lminstall -overfmt 2 (or 3, 4, 5 depending on the FLEXlm version).

Table of Contents * Index * Previous Chapter * Next Chapter