License Administration Tools
Chapter 7
FLEXnet Licensing provides utilities for the license administrator to help manage the licensing activities on the network. Always use the newest version of the utilities as possible; they are available for download from www.macrovision.com.
Table 7-1 lists these utilities.
FLEXnet Licensing Version Notes
Running Administration Tools
All FLEXnet Licensing utilities are packaged as a single executable called
lmutil
.lmutil
is either installed as individual commands (either by creating links to the individual command names, or making copies oflmutil
as the individual command names), or as a wrapper that runs the individual command aslmutil
command
. For example,lmutil
lmstat
, orlmutil
lmdown
.On Windows systems, the
lmutil
command
form of the commands are available. There is also a graphical user interface available for these commands -see "License Administration Tools-LMTOOLS for Windows."Universal lmutil Arguments
The following are valid arguments for most
lmutil
utilities:
FLEXnet Licensing Version Notes
lmborrow
lmborrow
supports borrowing of licenses that contain the BORROW attribute. It must be run on the machine where licenses are borrowed. It is used to perform the following:Initiating Borrowing
To initiate borrowing, the user sets the borrow period by running
lmborrow
from the command line or through LMTOOLS:lmborrow {
vendor
| all}enddate
[time
]where:
For example:
lmborrow sampled 20-aug-2001 13:00
This has the effect of setting
LM_BORROW
with the borrow period in either the registry (Windows) or in$HOME/.flexlmborrow
(UNIX).To borrow licenses for the desired vendor, on the same day and the same machine that the user runs
lmborrow
, run the application(s) to check out the license(s). If you run the application(s) more than once that day, no duplicate licenses are borrowed. No licenses are borrowed if the application is run on a day different than the date borrowing is initiated.In addition to the
lmborrow
utility, there are other ways to initiate borrowing:See "Initiating License Borrowing" for more information on these other ways.
Clearing the Borrowed License Setting
To clear the
LM_BORROW
setting in the registry or$HOME/.flexlmborrow
, issue the command:lmborrow -clear
Clearing the
LM_BORROW
setting stops licenses from being borrowed until borrowing is initiated again. A user might runlmborrow -clear
after he has borrowed licenses for features that are used offline if-before disconnecting from the network-he wants to run an application that checks out additional features, served byvendor,
that are not meant to be borrowed. ClearingLM_BORROW
does not change the status for already-borrowed licenses.Determining Borrowed License Status
To print information about borrowed features, issue the following command on the machine from which they are borrowed:
lmborrow -status
The borrowing system does not have to be connected to the network to determine the status.
Returning a Borrowed License Early
To return a borrowed license early, first reconnect the borrowing system back to the network and then, from the same machine that initiated the borrowing, issue the command:
lmborrow -return [-fqdn][-c
license_file_list
] [-cdisplay
]feature
where:
Returning the license early has the effect of clearing the LM_BORROW setting for the vendor daemon that serves the returned license.
If the borrowing system is not placed back on the network before attempting the early return, the license is not returned and LM_BORROW is kept intact. Additionally, an error message is issued to the end user with notification that the system needs to be connected to the network.
FLEXnet Licensing Version Notes
lmdiag
lmdiag
allows you to diagnose problems when you cannot check out a license.Usage is:
lmdiag [-c
license_file_list
] [-n] [feature
[:keyword
=value
]]where:
If no
feature
is specified,lmdiag
operates on all features in the license file(s) in your list.lmdiag
first prints information about the license, then attempts to check out each license. If the checkout succeeds,lmdiag
indicates this. If the checkout fails,lmdiag
gives you the reason for the failure. If the checkout fails becauselmdiag
cannot connect to the license server system, then you have the option of running "extended connection diagnostics."These extended diagnostics attempt to connect to each TCP/IP port on the license server machine, and detects if the port number in the license file is incorrect.
lmdiag
indicates each TCP/IP port number that is listening, and if it is anlmgrd
process,lmdiag
indicates this as well. Iflmdiag
finds the vendor daemon for the feature being tested, then it indicates the correct port number for the license file to correct the problem.See Also
lmdown
The
lmdown
utility allows for the graceful shutdown of selected license daemons (bothlmgrd
and selected vendor daemons) on all machines.Usage is:
lmdown -c
license_file_list
[-vendorvendor_daemon
] [-q] [-all] [-force]where:
If
lmdown
encounters more than one server (for example if-c
specifies a directory with many*.lic
files) and -all
is not specified, a choice of license server systems to shut down is presented.
Note On UNIX, do not use
kill -9
to shut down license server systems. On Windows, if you must use the Task Manager to kill the FLEXnet Licensing service, be sure to end thelmgrd
process first, then all the vendor daemon processes. On UNIX, do not usekill -9
to shut down license server systems. On Windows, if you must use the Task Manager to kill the FLEXnet Licensing service, be sure to end thelmgrd
process first, then all the vendor daemon processes.
When shutting down a three-server redundant license server system, there is a one-minute delay before the servers shut down.
lmdown
shuts down all three license server systems of a set of redundant license server systems. If you need to shut down one of a set of redundant license server systems (not recommended because you are left with two points of failure), you must kill both thelmgrd
and vendor daemon processes on that license server machine.You can protect the unauthorized execution of
lmdown
when you start up the license server manager,lmgrd.
Shutting down the servers causes users to lose their licenses.See Also
- "lmgrd Command-Line Syntax" for details about securing access to
lmdown
FLEXnet Licensing Version Notes
lmhostid
The
lmhostid
utility returns the FLEXnet Licensing hostid of the current platform. Invoked without any arguments,lmhostid
displays the default hostid type for current platform. Otherwise, the hostid corresponding to the requestedtype
is displayed, if supported on the current platform.Usage is:
lmhostid [-n] [-
type
] [-utf8]Where:
-n
Only the hostid, itself, is returned as a string, which is appropriate to use with HOSTID= in the license file. Header text is suppressed.-
type
One of the following hostid types.If not specified, the default hostid for the current platform is displayed. See Appendix A, "Hostids for FLEXnet Licensing-Supported Platforms," for a list of the default types. Platform Dependent Hostids-ether
Ethernet address.-string
String id.-vsn
Volume serial number. (Windows platforms only)-flexid
Parallel or USB FLEXid dongle identification. This is applicable only for those platforms that support FLEXid dongles. See "FLEXnet Licensing Hostids" for a complete list.-long
32-bit hostid. Platform Independent Hostids-user
Current user name.-display
Current display name. On Windows, it is the system name or, in the case of a terminal server environment, the terminal server client name. On UNIX, it is in the form/dev/tty
xx
or the X-Display name.-hostname
Current host name.-internet
IP address of current platform in the form###.###.###.###
.-utf8
The hostid is output as a UTF-8 encoded string rather than an ASCII string. If your hostid contains characters other than ASCII A through Z, a through z, or 0 through 9, use this option with lmhostid. To view a correct representation of the resulting hostid, use a utility, such as Notepad, that can display UTF-8 encoded strings.
The output of this command looks as follows:
lmhostid - Copyright (c) 1989, 2002 Macrovision Corporation
The FLEXlm hostid of this machine is "69021c89"See Also
lminstall
Introduced in v6.0,
lminstall
is designed primarily for typing in decimal format licenses to generate a readable format license file.Usage is:
lminstall [-i
in_lic_file
] [-maxlenn
] [-eerr_file
] [-oout_lic_file
] \
[-overfmt {2 | 3 | 4 | 5 | 5.1 | 6 | 7 | 7.1 | 8}] [-odecimal]Normally, to convert from decimal to readable format,
lminstall
is used with no arguments; you are prompted for the name of the output license file. The default file name is today's date inyyyymmdd
.lic
format. Move this file to the application's default license file directory, if specified by the software vendor. Otherwise, use theLM_LICENSE_FILE
orVENDOR
_LICENSE_FILE
environment variables to specify the directory where the*.lic
files are located.To finish entering, type
q
on a line by itself or enter two blank lines.When an input file is specified with no output file specified, output goes to stdout; if neither input nor output file is specified,
lminstall
assumes that input comes from stdin and prompts the user for an output file name.
lminstall
is also used to convert licenses from readable to decimal format, and between different versions of FLEXnet license formats.To convert from readable to decimal:
lminstall -i
in_lic_file
-oout_lic_file
-odecimalTo convert to v5.1 format:
lminstall -i
in_lic_file
-oout_lic_file
-overfmt 5.1To enforce a maximum line length of, for example, 50 characters:
lminstall -maxlen 50
Conversion errors are reported as necessary and can be written to a file by specifying
-e
err_file
.lminstall
has a limit of 1000 lines of input.lmnewlog
The
lmnewlog
utility switches the report log file by moving the existing report log information to a new file, then starting a new report log with the original report log file name. If you rotate report logs withlmnewlog
instead oflmswitchr
, you do not have to change the file name in the REPORTLOG line of the vendor's options file. Requires a v7.1+ vendor daemon.Usage is:
lmnewlog [-c
license_file_list
]feature renamed_report_log
or:
lmnewlog [-c
license_file_list
]vendor renamed_report_log
where:
lmpath
The
lmpath
utility allows direct control over FLEXnet license path settings. It is used to add to, override, or get the current license path settings.Usage is:
lmpath {-add | -override} {
vendor
| all}license_file_list
where:
Note
lmpath
works by setting the FLEXnet Licensing registry entry on Windows or$HOME/.flexlmrc
on UNIX.lmpath
works by setting the FLEXnet Licensing registry entry on Windows or$HOME/.flexlmrc
on UNIX.
To display the current license path settings, use:
lmpath -status
The following is displayed:
lmpath - Copyright (C) 1989-2002 Macrovision Corporation
Known Vendors:
_____________
demo: ./counted.lic:./uncounted.lic
_____________
Other Vendors:
______________
/usr/local/flexlm/licenses/license.lic
Note that where the path is set to a directory, all the
*.lic
files are listed separately.lmremove
The
lmremove
utility allows you to remove a single user's license for a specified feature. If the application is active, it re-checks out the license shortly after it is freed bylmremove
.Usage is:
lmremove [-c
license_file_list
]feature user user_host display
or
lmremove [-c
license_file_list
] -hfeature server_host port handle
where:
The
user
,user_host
,display
,server_host, port
, andhandle
information must be obtained from the output oflmstat -a
.
lmremove
removes all instances ofuser
onuser_host
anddisplay
from usage offeature
. If the optional-c
license_file_list
is specified, the indicated file(s) is used as the license file.The
-h
variation uses theserver_host
,port
, and licensehandle
, as reported bylmstat -a
. Consider this examplelmstat -a
output:joe nirvana /dev/ttyp5 (v1.000) (cloud9/7654 102), start Fri 10/29 18:40
In this example, the user is "joe," the user host is "nirvana," the display is "/dev/typp5," the server host is "cloud9," the TCP/IP port is "7654," and the license handle is "102."
To remove this license, issue one of the following commands:
lmremove f1 joe nirvana /dev/ttyp5
or
lmremove -h f1 cloud9 7654 102
When removing by handle, if licenses are grouped as duplicates, all duplicate licenses are also removed. If license lingering is set and
lmremove
is used to reclaim the license,lmremove
starts, but does not override, the license's linger time.You can protect the unauthorized execution of
lmremove
when you start up the license server manager,lmgrd,
because removing a user's license is disruptive.See Also
- "lmgrd Command-Line Syntax" for details about securing access to
lmremove
lmreread
The
lmreread
utility causes the license server manager to reread the license file and start any new vendor daemons that have been added. In addition, all currently running vendor daemons are signaled to reread the license file and their end-user options files for changes in feature licensing information or option settings. If report logging is enabled, any report log data still in the vendor daemon's internal data buffer is flushed.lmreread
recognizes changes to server machine host names, but cannot be used to change server TCP/IP port numbers.If the optional vendor daemon name is specified, only the named daemon rereads the license file and its end-user options file (in this case,
lmgrd
does not reread the license file).Usage is:
lmreread [-c
license_file_list
] [-vendorvendor
] [-all]where:
Note If you use the
-c
license_file_list
option, the license file(s) specified are read bylmreread
, not bylmgrd
;lmgrd
rereads the file it read originally. If you use the-c
license_file_list
option, the license file(s) specified are read bylmreread
, not bylmgrd
;lmgrd
rereads the file it read originally.
You can protect the unauthorized execution of
lmreread
when you start up the license server manager,lmgrd.
See Also
- "lmgrd Command-Line Syntax" for details about securing access to
lmreread
FLEXnet Licensing Version Notes
lmstat
The
lmstat
utility helps you monitor the status of all network licensing activities, including:
lmstat
prints information that it receives from the license server system; therefore, it does not report on unserved licenses such as uncounted licenses. To report on an uncounted license, the license must be added to a served license file and the application must be directed to use the license server system for that license file (via@
host
,port
@
host
or USE_SERVER). Queued users and licenses shared due to duplicate grouping are also not returned bylmstat
.Usage is:
lmstat [-a] [-c
license_file_list
] [-f [feature
]] [-i [feature
] [-s[server
]
[-S [vendor
]] [-ttimeout_value
]where:
The output of
lmstat -a
looks similar to:License server system status: 27000@myhost1
License file(s) on myhost:install_dir
/flexlm/v9.3/sun4_u5/counted.lic:
myhost: license server system UP (MASTER) v9.3
Vendor daemon status (on myhost1):
demo: UP v9.3
Feature usage info:
Users of f1: (Total of 4 licenses issued; Total of 1 license in use)
"f1" v1.0, vendor: demo
floating license
daniel myhost2 19.36.18.26 (v1.0) (myhost1/27000 102), start Fri
5/3 7:29where:
The
user
,user_host
,display
,server_host, port
, andhandle
information is used when removing licenses withlmremove
.
Note
lmstat -a
is a potentially expensive command. With many active users, this command generates a lot of network activity.lmstat -a
is a potentially expensive command. With many active users, this command generates a lot of network activity.
FLEXnet Licensing Version Notes
lmswitch
The
lmswitch
utility switches the debug log file written by a particular vendor daemon by closing the existing debug log for that vendor daemon and starting a new debug log for that vendor daemon with a new file name. It also starts a new debug log file written by that vendor daemon if one does not already exist.Usage is:
lmswitch [-c
license_file_list
]vendor
new_debug_log
where:
-c
license_file_list
Use the specified license file(s).vendor
Vendor daemon in this license file.new_debug_log
Path to new debug log file.
By default, debug log output from
lmgrd
and all vendor daemons started by thatlmgrd
get written into the same debug file.lmswitch
allows companies to keep separate log files for different vendors and control the size of their debug log file.If debug log output is not already directed to a separate file for this vendor daemon,
lmswitch
tells the vendor daemon to start writing its debug log output to a file,new_debug_log
. If this vendor daemon is already writing to its own debug log,lmswitch
tells the vendor daemon to close its current debug log file and start writing its debug log output tonew_debug_log
.
Note The effect of
lmswitch
continues only until the vendor daemon is shut down or its options file is reread vialmreread
. When the vendor daemon is restarted or its options file is reread, it looks for a DEBUGLOG line in the options file to determine whether or not to write its debug log output into its own file and, if so, what file to write. The effect oflmswitch
continues only until the vendor daemon is shut down or its options file is reread vialmreread
. When the vendor daemon is restarted or its options file is reread, it looks for a DEBUGLOG line in the options file to determine whether or not to write its debug log output into its own file and, if so, what file to write.
See Also:
lmswitchr
The
lmswitchr
utility switches the report log file by closing the existing report log and starting a new report log with a new file name. It also starts a new report log file if one does not already exist.Usage is:
lmswitchr [-c
license_file_list
]feature new_report_log
or with v5.0+ vendor daemon:
lmswitchr [-c
license_file_list
]vendor new_report_log
where:
-c
license_file_list
Use the specified license file(s).feature
Any feature in this license file.vendor
Vendor daemon in this license file.new_report_log
Path to new report log file.
If report logging is not enabled for the vendor daemon,
lmswitchr
tells it to start writing its report log output tonew_report_log
. If report logging is already enabled for the vendor daemon,lmswitchr
tells the vendor daemon to close its report log file and start writing its new report log output tonew_report_log
.
Note The effect of
lmswitchr
continues only until the vendor daemon is shut down or its options file is reread vialmreread
. When the vendor daemon is restarted or its options file is reread, it looks for a REPORTLOG line in the options file to determine whether or not to write report log output to a file and, if so, what file to write. The effect oflmswitchr
continues only until the vendor daemon is shut down or its options file is reread vialmreread
. When the vendor daemon is restarted or its options file is reread, it looks for a REPORTLOG line in the options file to determine whether or not to write report log output to a file and, if so, what file to write.
See Also:
lmver
The
lmver
utility reports the FLEXnet Licensing version of a library or binary file.Usage is:
lmver
filename
where
filename
is one of the following:For example if you have an application called "spell," type:
lmver spell
License Administration Tools-LMTOOLS for Windows
For the 32-bit Windows platforms, a graphical user interface to the license server manager tools is provided called LMTOOLS. Always use the newest version of LMTOOLS as possible; it is available for download from www.macrovision.com.
Some of the functions LMTOOLS performs include:
LMTOOLS has two modes in which to configure a license server system:
Configuration Using License File
Operations are performed on a particular license file. The file can be either local or remote. In this mode, you cannot start the
lmgrd
process, but you can do everything else. To configure this mode, perform the following:Configuration Using Services
Operations are performed on a service, which allows starting
lmgrd
processes local to the system on which LMTOOLS is running. For details on configuring services, see "Configuring the License Server Manager as a Windows Service."
FLEXnet Licensing End User Guide |
Version 10.8 |
July 2005 |
copyright |