Chapter 7. License Administration Tools

FLEXlm provides utilities to the license administrator to help manage the licensing activities on the network. These utilities are:

Beginning in FLEXlm v2.4, all FLEXlm utility programs (except lmgrd) are packaged as a single executable called lmutil. lmutil can either be installed as the individual commands (either by creating links to the individual command names, or making licenses for lmutil as the individual command names), or the commands can be run as “lmutil command”, e.g. “lmutil lmstat”, or “lmutil lmdown”.

lmcksum

The lmcksum program (FLEXlm v2.4 or later) will perform a checksum of a license file. This is useful to verify data entry errors at your customer's location. lmcksum will print a line-by-line checksum for the file as well as an overall file checksum. lmcksum takes the “-k” switch to force the encryption code checksum to be case-sensitive.

lmcksum will ignore all fields that do not enter into the encryption code computation; thus the server node name and port number, as well as the daemon pathname and options file names are not checksummed. In addition, lmcksum will treat non-case sensitive fields correctly (in general, lmcksum is not case-sensitive).

lmcksum takes an optional daemon name; if specified, only license file lines for the selected daemon are used to compute the checksums.

By default, lmcksum operates on “license.dat” in the current directory. Specify -c license_file if you want to checksum another license file. Example output is:

lmcksum - Copyright (C) 1989, 1993 Globetrotter Software, Inc.
lmcksum: using license file “/usr/local/flexlm/licenses/license.dat”

189: SERVER speedy 08002b32b161 2837
166: DAEMON demo /u/gsi/lmgr/src/testsuite/demo 
8: FEATURE f1 demo 1.000 01-jan-99 0 3B2BC33CE4E1B8F3A0BF ““ 08002b32b161
109: (overall file checksum)

lmdiag

lmdiag (FLEXlm v4.0 or later) allows you to diagnose problems when you cannot check out a license.

Usage is:

lmdiag [-c license_file] [-n] [feature]

where:  

is the:

-c license_file 

path to file to diagnose.

-n  

run in non-interactive mode; lmdiag will not prompt for any input in this mode. In this mode, extended connection diagnostics are not available.

feature 

diagnose this feature only.

If no feature is specified, lmdiag will operate on all features in the license file(s) in your path. lmdiag will first print information about the license, then attempt to check out each license. If the checkout succeeds, lmdiag will indicate this. If the checkout fails, lmdiag will give you the reason for the failure. If the checkout fails because lmdiag cannot connect to the license server, then you have the option of running “extended connection diagnostics”.

These extended diagnostics attempt to connect to each port on the license server node, and can detect if the port number in the license file is incorrect. lmdiag will indicate each port number that is listening, and if it is an lmgrd process, lmdiag will indicate this as well. If lmdiag finds the vendor daemon for the feature being tested, then it will indicate the correct port number for the license file to correct the problem.

lmdown

The lmdown utility allows for the graceful shutdown of all license daemons (both lmgrd and all vendor daemons) on all nodes.

Usage is:

lmdown [-c license_file]

where:  

is the:

-c license_file 

Use the specified license file. If this switch is not used, lmgrd looks for the environment variable LM_LICENSE_FILE. If that environment variable is not set, lmgrd looks for the file /usr/local/flexlm/licenses/license.dat.

You should protect the execution of lmdown, since shutting down the servers causes users to lose their licenses. See the “-p” or the “-x” options in “lmgrd” for details about securing access to lmdown.

lmgrd

lmgrd is the main daemon program for FLEXlm. When you invoke lmgrd, it looks for the license file. The license file contains information about vendors and features.

Usage is:

lmgrd [ -c license_file ] [ -t timeout_interval ]
[ -s timestamp_interval ] [ -p ][ -2 ] -v [-x lmdown] [-x lmremove]

where:  

is the:

-c license_file 

Use the license file named. If this switch is not specified, lmgrd looks for the environment variable LM_LICENSE_FILE. If that environment variable is not set, lmgrd looks for the file /usr/local/flexlm/licenses/license.dat.

-t timeout _interval 


Sets a timeout interval, in seconds, during which redundant daemons must complete their connections to each other. The default value is 10 seconds. A larger value may be desirable if the daemons are being run on busy systems or a very heavily loaded network.

-s timestamp_interval 


Specifies the logfile timestamp interval, in minutes. The default is 360 minutes.

-p 

Restricts usage of lmdown, lmreread, and lmremove to a FLEXlm administrator who is by default root. If there a UNIX group called “lmadmin” then use is restricted to only members of that group. If root is not a member of this group, then root does not have permission to use any of the above utilities. Requires the -2 option.

-2 

Use the FLEXlm v2.x daemon startup protocol.

-v 

Prints lmgrd's version number and copyright and exits.

-x lmdown 

Disallow the lmdown command (no user can run lmdown)

-x lmremove 

Disallow the lmremove command (no user can run lmremove)


Note: The -x lmdown and -x lmremove options are available in FLEXlm v4.0 and later.



Note: The “-p” option is available in FLEXlm v2.4 and later.


lmhostid

The lmhostid utility reports the hostid of a system.

Usage is:

lmhostid

The output of this command looks as follows:

lmhostid - Copyright (c) 1989, 1990 Globetrotter Software, Inc.
The FLEXlm hostid of this machine is “69021c89”

See Appendix C, “Hostids for FLEXlm-Supported Machines.”


Note: For HP users only in FLEXlm v3.0 and above the default for lmhostid is “uname –i”. The v2.4 default was the Ethernet address. To obtain the Ethernet hostid with FLEXlm v3.0 administration tools, use the command lmhostid ether.


lmremove

The lmremove utility allows you to remove a single user's license for a specified feature. For instance, when a user is running the software on a node that crashes, the user's license sometimes remains checked out and unavailable to anyone. lmremove returns the license to the pool of available licenses.

Usage is:

lmremove [-c license_file] feature user host display

where:  

is the:

-c license_file 

Use the license file named. If this switch is not specified, lmgrd looks for the environment variable LM_LICENSE_FILE. If that environment variable is not set, lmgrd looks for the file /usr/local/flexlm/licenses/license.dat.

feature 

The name of the feature checked out by the user.

user 

The name of the user whose license you are removing.

host 

The name of the host the user is logged in to.

display 

The name of the display where the user is working.

You should protect the execution of lmremove, since removing a user's license can be disruptive. See the “-p” or the “-x” options in “lmgrd” for details about securing access to lmremove.


Note: If you use lmremove to reclaim a license but that user is in fact still using the application the license will be rechecked out almost immediately.


lmreread

The lmreread utility causes the license daemon to reread the license file and start any new vendor daemons that have been added. In addition, all pre-existing daemons will be signaled to reread the license file for changes in feature licensing information.

Usage is:

lmreread [-c license_file]

where:  

is the:

-c license_file 

Use the license file named. If this switch is not specified, lmgrd looks for the environment variable LM_LICENSE_FILE. If that environment variable is not set, lmgrd looks for the file /usr/local/flexlm/licenses/license.dat.

The license administrator may want to protect the execution of lmreread, since removing a user's license can be disruptive. See the “-p” option in “lmgrd” for details about securing access to lmreread.


Note: If you use the “-c” option, the license file specified will be read by lmreread, not by lmgrd; lmgrd rereads the file it read originally. Also, lmreread cannot be used to change server node names or port numbers. Vendor daemons will not reread their option files as a result of lmreread.


lmstat

The lmstat utility helps you monitor the status of all network licensing activities, including:

  • which daemons are running

  • users of individual features

  • users of features served by a specific DAEMON

Usage is:

lmstat 	[-a] [-S [daemon]] [-f [ feature]] [-i feature] 
	[-s [server]] [-t value] [-c license_file] [ -A ] 

where:  

is the:

-a 

Display all information

-A 

List all active licenses

-c license_file 

Use the license file named. If this switch is not specified, lmgrd looks for the environment variable LM_LICENSE_FILE. If that environment variable is not set, lmgrd looks for the file /usr/local/flexlm/licenses/license.dat.

-f [feature_name] 


List users of feature(s).

-i [feature_name] 


Prints information about the named feature, or all features if no feature name is given.

-s [server_name] 


Display status of server node(s).

-S [DAEMON] 

List all users of DAEMON's features.

-t value 

Set lmstat timeout to “value”.

lmswitch


Note: The lmswitch command is available on VMS only.

The lmswitch utility switches the debug log file for the daemon serving the specified feature while the daemon is running.

Usage is:

lmswitch feature new-file

where:  

is the:

feature 

any feature this daemon supports.

new-file 

the new file path.

Of course, for this syntax to work, lmswitch needs to be installed as a foreign command.

The new logfile will be opened for write, rather than append, so it is possible to “switch” to the same filename in order to be able to view the old log file.

lmswitchr

The lmswitchr utility switches the report writer (REPORTLOG) log file for the specified feature.

Usage is:

lmswitchr feature new-file

where:  

is the:

feature 

any feature this daemon supports.

new-file 

the new file path.

lmver

The lmver utility reports the FLEXlm version of a library or binary file.

Usage is:

lmver [filename]

where:  

is the:

filename 

name of the executable of the product.

For example if you have an application called “spell” type:

% lmver spell