Chapter 6
The License Manager Daemon
The license manager daemon,
lmgrd
, is one of two components which comprise the license server (the other being the vendor daemon). It handles the initial contact with FLEXlm-licensed applications, passing the connection on to the appropriate vendor daemon. The purpose of the license manager daemon,lmgrd
, is to:A newer
lmgrd
can be used with an older vendor daemon or FLEXlm-licensed application, but a newer vendor daemon or FLEXlm-licensed application might not work properly with an olderlmgrd
. Always use the newest version oflmgrd
as possible; it is available for download from www.macrovision.com.6.1 lmgrd Command-Line Syntax
lmgrd
is the main daemon for FLEXlm. When you invokelmgrd
, it looks for a license file which contains information about vendors and features and starts those vendor daemons.Usage is:
lmgrd [-c
license_file_list
] [-l [+]debug_log_path
]
[-2 -p] [-local] [-x lmdown]
[-x lmremove] [-z ] [-v] [-help]where:
-c
license_file_list
Use the specified license file(s).-l [+]
debug_log_path
Write debugging information to filedebug_log_path
. This option uses the letterl
, not the numeral 1. Prependingdebug_log_path
with the + character appends logging entries. See Appendix H, “The Debug Log File,” for more information on this file.-2 -p
Restricts usage oflmdown
,lmreread
, andlmremove
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. If-2 -p
is used when startinglmgrd
, no user on Windows can shut down the license server withlmdown
.-local
Restricts thelmdown
command to be run only from the same machine wherelmgrd
is running.-x lmdown
Disable thelmdown
command (no user can runlmdown
). Iflmdown
is disabled, stoplmgrd
viakill
pid
(UNIX) or stop thelmgrd
and vendor daemon processes through the Windows Task Manager or Windows service. On UNIX, be sure thekill
command does not have a-9
argument. (v4.0+lmgrd
)-x lmremove
Disable thelmremove
command (no user can runlmremove
). (v4.0+lmgrd
)-z
Run in foreground. The default behavior is to run in the background. If-l
debug_log_path
is present, then no windows are used, but if no-l
argument specified, separate windows are used forlmgrd
and each vendor daemon.-v
Displayslmgrd
version number and copyright and exits. -help Displays usage information and exits.
6.2 Starting the License Manager Daemon on UNIX Platforms
If any licenses in the license file are counted (license count > 0), the license manager daemon, and hence the license server, must be started before the FLEXlm licensed application can be used.
The license manager daemon, lmgrd, is started either manually on the command line or automatically at system startup. Both methods are discussed in the following sections.
Note: Start
lmgrd
only on the server node specified on the SERVER line in the license file.
If you are running three-server redundant license servers, maintain a separate copy of the license file (as well as thelmgrd
and the vendor daemons binaries) 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.
6.2.1 Manually
Start
lmgrd
from the UNIX command line using the following syntax:
lmgrd
-clicense_file_list
-L [+]debug_log_path
where
Start
lmgrd
by a user other than “root”, since processes started by root can introduce security risks. Iflmgrd
must be started by the root user, use thesu
command to runlmgrd
as a non-privileged user:su
username
-c "lmgrd -clicense_file_list
-l \debug_log_path
"where
username
is a non-privileged user. You must ensure that the vendor daemons listed in the license file have execute permissions forusername
. The paths to all the vendor daemons in the license file are listed on each VENDOR line.6.2.2 Automatically
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. Include commands similar to the following. 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:
- All paths are specified in full, because no paths are assumed at boot time.
- Because no paths are assumed, the vendor daemon must be in the same directory as
lmgrd
, or the VENDOR lines in the license file must be edited to include the full path to the vendor daemon.- The
su
command is used to runlmgrd
as a non-root user, “daniel.” It is recommended thatlmgrd
not be run as “root,” since it is a security risk to run any program as “root” that does not require root permissions.lmgrd
does not require root permissions.- Daniel has a
csh
login, so all commands executed as “daniel” must be incsh
syntax. All commands not executed as “daniel” must be in/bin/sh
syntax, since that is what is used by the boot scripts.- The use of
nohup
andsleep
are required on some operating systems, notably HP-UX and Digital UNIX. These are not needed on Solaris and some other operating systems, but are safe to use on all.lmdiag
is used as a diagnostic tool to verify that the server is running and serving licenses.
Note: This does not start the daemon until you reboot your license server machine.
6.3 Starting the License Manager Daemon on Windows
6.3.1 Manually from the Command Line
Start lmgrd
as an application from a Windows command shell using the following syntax:C:\flexlm> lmgrd -c
license_file_list
-L [+]debug_log_path
where
Spaces in pathnames require double quotes around the path.
On Windows,
lmgrd
can be installed as a service to allow it to be started and stopped through a user interface and run in the background.6.3.2 Configuring the License Manager as a Windows Service
To configure a license server as a service, you must have Administrator privileges:
- Run LMTOOLS.
- Click the
Configuration using Services
radio button, then click the Config Services tab.- In the
Service Name
, type the name of the service that you want to define, for example, Myvendor License Manager.- In the
Path to the lmgrd.exe file
field, enter or browse tolmgrd.exe
for this license server.- In the
Path to the license file
field, enter or browse to the license file for this license server.- In the
Path to the debug log file
, enter or browse to the debug log file that this license server writes. Prepending the debug log file name with the + character appends logging entries.
- To save the new Myvendor License Manager service, click the
Save Service
button.6.3.3 Manually from LMTOOLS
A graphical user interface to the license manager tools is provided called LMTOOLS. Some of the functions LMTOOLS performs include:
In order to control the operation of
lmgrd
from the LMTOOLS user interface, you first must configure it as a license manager service. Follow the procedure in Section 6.3.2, “Configuring the License Manager as a Windows Service,” before proceeding.Once the license manager service is configured, lmgrd is started by starting the service from the LMTOOLS interface:
- Start LMTOOLS.
LMTOOLS appears with the
Service/License File
tab open.- Click the
Configuration using Services
radio button.- Select the service name from the list presented in the selection box. In this example, the service name is
Myvendor License Manager
.- Click the
Start/Stop/Reread
tab.
- Start Myvendor License Manager by clicking the
Start Server
button.Myvendor License Manager license server starts and writes its debug log output to
c:\flexlm\lmgrd.dl
.6.3.4 Automatically at System Start Up
In order for lmgrd, and hence the license server, to start up automatically at system start up time, you first must configure it as a license manager service. Follow the procedure in Section 6.3.2, “Configuring the License Manager as a Windows Service,” before proceeding. Then continue:
- With LMTOOLS started and the desired service name selected, click the Config Services tab.
- Make this license manager a Windows service: check the
Use Services
check box (otherwise, it becomes a FLEXlm service).- Configure it to start at system startup time by checking the
Start Server at Power Up
check box.From now on, when the machine is rebooted, this license manager starts automatically as a Windows service.
FLEXlm End Users Guide | |||
March 2003 |