TOCPREVNEXTINDEX


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 older lmgrd. Always use the newest version of lmgrd 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 invoke lmgrd, 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 file debug_log_path. This option uses the letter l, not the numeral 1. Prepending debug_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 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. If -2 -p is used when starting lmgrd, no user on Windows can shut down the license server with lmdown.
-local
Restricts the lmdown command to be run only from the same machine where lmgrd is running.
-x lmdown
Disable the lmdown command (no user can run lmdown). If lmdown is disabled, stop lmgrd via kill pid (UNIX) or stop the lmgrd and vendor daemon processes through the Windows Task Manager or Windows service. On UNIX, be sure the kill command does not have a -9 argument. (v4.0+ lmgrd)
-x lmremove
Disable the lmremove command (no user can run lmremove). (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 for lmgrd and each vendor daemon.
-v
Displays lmgrd 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 the lmgrd 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 -c license_file_list -L [+]debug_log_path

where

Start lmgrd by a user other than “root”, since processes started by root can introduce security risks. If lmgrd must be started by the root user, use the su command to run lmgrd as a non-privileged user:

su username -c "lmgrd -c license_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 for username. 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:

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:

  1. Run LMTOOLS.
  2. Click the Configuration using Services radio button, then click the Config Services tab.
  3. In the Service Name, type the name of the service that you want to define, for example, Myvendor License Manager.
  4. In the Path to the lmgrd.exe file field, enter or browse to lmgrd.exe for this license server.
  5. In the Path to the license file field, enter or browse to the license file for this license server.
  6. 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.


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

  1. Start LMTOOLS.


  2. LMTOOLS appears with the Service/License File tab open.

  3. Click the Configuration using Services radio button.
  4. Select the service name from the list presented in the selection box. In this example, the service name is Myvendor License Manager.
  5. Click the Start/Stop/Reread tab.


  6. 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:

  1. With LMTOOLS started and the desired service name selected, click the Config Services tab.


  2. Make this license manager a Windows service: check the Use Services check box (otherwise, it becomes a FLEXlm service).
  3. 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.


TOCPREVNEXTINDEX

 

FLEXlm End Users Guide
March 2003