Administering the License Management Facility

This chapter explains what's involved in administering the License Management Facility.

In this Chapter

Administration Tasks

There is little to do to administer the License Management Facility, since the facility runs automatically without manual intervention. However, there is some setting up and some occasional monitoring to do.

The administration tasks are:

Deciding What Licenses to Order

When deciding how many licenses to order of each type, consider that:

For full information on licensing, see your End User Product License agreement and associated license information shipped with the software.

Installing the License Management Facility

You must install the License Management Facility on every system that runs licensed products. You need only one License Management Facility on each system, regardless of the number of the licensed products.

You can either install the License Management Facility independently or as part of installing a licensed product. If you do not install the License Management Facility as part of the product, you can install it later by going to the lmf subdirectory of the directory where the product was installed, and entering:

sh lmfinstall

See the booklet that came with your CD for information on installing the License Management Facility.

Starting the License Manager

The installation process gives you the option of automatically starting up the License Manager every time the system is booted. If you did not choose the automatic startup, you need to start the License Manager manually every time you boot the system.

To start the License Manager manually:

  1. Log in as root.
  2. Go to the directory where the License Management Facility is installed, /opt/microfocus/mflmf.
  3. Enter the following command:
    sh mflmman [FORCE|WAIT] [TRACE]

FORCE, WAIT and TRACE are optional:

FORCE The License Manager does not by default start up if there are still licensed tasks running that were started from a previous run of the License Manager.

In this situation, you can use the FORCE directive to force License Manager to first terminate the previously started licensed tasks, and then to start.

WAIT This directive suspends the License Manager until any outstanding licensed tasks from a previous License Manager run have finished.

Use this directive when you do not want existing licensed tasks to be terminated prematurely, and want to wait for them to complete naturally.

TRACE With this directive, the License Manager maintains a log of the License Manager activity in the file, MF-LMF.log.

This directive records additional information in the log file. This file is mainly for our use to help you solve any problems you might have with the License Management Facility.

Use this directive if unusual behavior has occurred. Do not use it by default, as the log file can become very large.

If you decide later, after the installation process, that you want to start License Manager automatically at boot time, you can set this up as follows:

  1. Copy the script into the /etc directory.
  2. Add the following entry to your /etc/inittab file:
    mF:2345:wait:sh /etc/mflmrcscript>/dev/null 2>&1

    Refer to your operating system documentation for more details.

Installing License Keys Initially

Before users can use licensed products, you need to install the license keys for those products. Each license key unlocks a licensed product, enabling the product to be used.

Installing a license key is a separate procedure from installing the licensed product. This enables you to add more license keys at any time, without reinstalling the licensed product.

You can install a license key from the command line or by using the menu interface of the License Administration Services. To get started quickly, install them from the command line, as follows:

  1. Go to the directory where the License Management Facility is installed, /opt/microfocus/mflmf.
  2. Enter:
    sh mflmcmd 
  3. When prompted, enter I.
  4. When prompted enter the serial number, which is printed on your License Key Card.
  5. When prompted enter the license number, which is also printed on your License Key Card.

    The license is then added to the license database.

64-bit Server Express on AIX:

If you are installing 64-bit licenses to enable you to use the 64-bit Server Express development system on AIX, any 32-bit licenses installed for a previous version of 32-bit Server Express on AIX remain enabled. If you are using the 64-bit working mode, you can install and uninstall 32-bit licenses at any time, although these will have no effect on 64-bit Server Express.

You cannot use 32-bit licenses with 64-bit Server Express on AIX, nor can you use 64-bit licenses with 32-bit Server Express on AIX.

Managing License Keys Using the License Administration Services

The License Administration Services provides a menu-driven interface for managing Micro Focus product license keys, including installing and uninstalling license keys, and reviewing the licenses installed. The easiest way of starting this is to first run the script mflicense, which gives you access to both development and Micro Focus Server licensing.

Before using the menu interface, your terminal must be set up to support the necessary screen handling and the associated function keys. You need to configure your environment so that:

We recommend that you read the chapter Terminfo Database and Terminal Devices in your User's Guide before proceeding.

Starting the License Administration Services

To start the License Administration Services:

  1. Enter mflicense at a command prompt.
  2. Enter 1 (Development License System). You see the License Administration Services main menu.

    To get help using the License Administration Services, press F1=Help, which displays information about the current menu.

Tip: If the function keys, such as F2 and F3, are not available on your UNIX terminal, you can press / followed by the number of the function key. For example, press /2 for F2. See the appendix UNIX Key Usage Chart for a complete list of keys.

Installing License Keys Using the License Administration Services

Before users can use licensed products, you need to install the license keys for those products. Each license key unlocks a licensed product, enabling the product to be used.

Installing a license key is a separate procedure from installing the licensed product. This enables you to add more license keys at any time, without reinstalling the licensed product.

To install a license key using the menu interface of the License Administration Services:

  1. Go to the License Administration Services Main menu.
  2. Press F2=key and enter the license key, which comprises the serial number and license number printed on the License Key Card, entitled Important Product Information.
  3. Press enter to accept the license key you just entered. Details of the product and license key type are displayed.
  4. Press F3=install to add these details into the license database.
  5. Press F7=refresh to activate your license so that you can run the product.

Note: You can also refresh the license database by entering the command:

lmfgetpv r

at the command line. You must be in the directory where License Management Facility is installed, /opt/microfocus/mflmf.

Reviewing, Adding and Redistributing Licenses

From time to time, you need to check what licenses are installed. You might then need to order more licenses or change the distribution of existing licenses among users and machines.

To review the licenses in use, from the Main menu of the License Administration Services, press F5=Browse. You can look through the licenses already loaded by pressing F2=Previous and F3=Next. Press F5=End-browse to return to the Main menu.

If you require more licenses, because for example, more users want to use one of the licensed products, contact your Sales Representative to order them.

If you need to move an existing license from one machine to another, uninstall the license key first from one machine and then install it on the other machine. For instructions on how to do this, see the sections Uninstalling a License Key and Installing License Keys Initially in this chapter.

Uninstalling a License Key

To uninstall a license key, from the Main menu of the License Administration Services, press F2=key, and enter the serial number and license number printed on the License Key Card, entitled Important Product Information. Then press enter and press F4=uninstall.

Ensuring the License Manager Is Running Properly

The License Manager runs continuously and does not require any manual intervention. It communicates through the console, reporting status and activity such as that the License Manager process has started. The License Manager process, mflm_manager, is a free-standing separate process, running as a daemon.

To confirm that the License Manager is running:

  1. Go to the directory where License Management Facility is installed, /opt/microfocus/mflmf.
  2. Enter the command:
    ./lmfgetpv

    If the License Manager is running, lmfgetpv tells you the version number of the running License Manager and the path from where it was loaded. Otherwise, you are told that the License Manager is not running.

The license database is automatically backed up. In the unlikely event of a problem, the License Administration Services detects the problem at startup and gives you the option of restoring from backup. The license database files are mflmfdb, mflmfdb.idx, mflmfdbX, and mflmfdbX.idx.

If you encounter a serious problem, contact Product Support for help in resolving it. (See the on-disk document readme for more details.) They might ask you to:

Viewing Current Processes

To obtain a list of processes currently running that are holding licenses:

  1. Go to the directory where the utility lmfgetpv is located, /opt/microfocus/mflmf.
  2. Enter the command:
    ./lmfgetpv w

    The lmfgetpv utility displays for each process the elapsed time that it has been running for, the user ID (as a number and as a name), the process ID, the last eight characters of the terminal name, and the product being run.

Obtaining a Dump of the License Manager

To obtain a dump of the License Manager daemon:

  1. Go to the directory where the utility lmfgetpv is located, /opt/microfocus/mflmf.
  2. Enter the command:
    ./lmfgetpv d

    The lmfgetpv utility writes a binary dump of data from the License Manager daemon to the file lmf-dump, in the LMF directory from which License Manager was started. This file could be useful to Product Support when investigating a licensing issue.

Stopping the License Manager

To stop the License Manager running:

  1. Log in as root.
  2. Go to the directory where you installed the License Management Facility, /opt/microfocus/mflmf.
  3. Enter the command:
    ./lmfgetpv k

Temporary Files

License Manager uses named pipes as temporary files and creates them in the location defined by the UNIX operating system setting of P_tmpdir. This is typically /tmp. You might want to relocate the named pipes.

When License Manager is launched it creates one long-lived named pipe, called LMF-common, which exists until License Manager is closed down. While it is running it also creates a number of transient named pipes, that exist only for a short time.

Relocating the Long-lived Named Pipe

You might want to relocate LMF-common to a different directory, so that you can delete all entries in the temporary directory, without having to explicitly exclude this pipe. To do this you must include in the job that starts License Manager the environment variable LMFCOMM. This environment variable must be set before your job executes the command to start License Manager. The format of LMFCOMM is:

LMFCOMM=directory

where directory is the full pathname of the directory that is to be used by License Manager to place its named pipe LMF-common. For example:

LMFCOMM=/usr/templmf
export LMFCOMM

The directory specified by LMFCOMM must have full read/write/execute permission for all users who will be using the licensed development system. In addition, all development system users must also set LMFCOMM in their own environment to the same value as that used by License Manager. If this is not done, then users will be unable to contact License Manager and obtain a license unit.

Note: The setting of LMFCOMM is independent of the setting of LMFTEMP. LMFTEMP is described in the next section.

Relocating the Transient Named Pipes

You can also relocate the short-lived named pipes; however, there is usually no good reason for doing this, since any named pipes that are not destroyed by License Manager - perhaps because of a system failure of some kind - are anyway automatically deleted during the normal purge of the system temporary directory that occurs on most systems.

If you do want to relocate the transient named pipes you must set the environment variable LMFTEMP; the format is:

LMFTEMP=directory

where directory is the full pathname of the directory that is to be used by License Manager to place its transient named pipes. This environment variable must be set before your job executes the command to start License Manager. For example:

LMFTEMP=/usr/templmf
export LMFTEMP

The directory specified by LMFTEMP must have full read/write/execute permission for all users who will be using the licensed development system. In addition, all development system users must also set LMFTEMP in their own environment to the same value as that used by License Manager. If this is not done, then users will be unable to contact License Manager and obtain a license unit.

Note: The setting of LMFTEMP is independent of the setting of LMFCOMM. LMFCOMM is described in the previous section.

Problems that Users Might Encounter

This section discusses some problems that your developers might encounter and explains how to avoid them. For further advice about possible problems, see the chapter Frequently Asked Questions.

Batch Run Interactions

If users run a sequence of development tasks from a script (for example, to compile a suite of programs), it is possible that insufficient licenses will be available at the instant that the script attempts to launch one of the development tasks.

This could occur if:

In either case, while some of the development tasks in a script will be successful, others will fail as no license will be available.

The user's script can monitor the success or otherwise of each task by testing the return value of the task via the shell $? return status. Zero indicates success, non-zero failure.

If developers are running such scripts, and meeting this problem, you should advise them to set the environment variable LMFWAIT for the task. LMFWAIT is used to set a value that specifies the number of times a task should attempt to get a license unit. By default, the task sleeps for 10 seconds between each attempt. In effect, the task suspends itself until a license unit becomes free.

The format of LMFWAIT is:

LMFWAIT=retries[,wait]

where the parameters are:

retries The number of times the task should attempt to obtain a license
wait The time that should be waited, in seconds, between each attempt to obtain a license. The default is 10.

For example, to allow 100 attempts to use a license, LMFWAIT should be set as follows:

LMFWAIT=100
export LMFWAIT

To allow 25 attempts to use a license, with a 1 minute wait between each attempt:

LMFWAIT=25,60
export LMFWAIT

Running Animator with the SDE

If a developer has the environment variable COBSW set to +A, (meaning invoke the Animator), then invokes the Server Express Integrated Development Environment (SDE), a debug session starts and attempts to obtain a terminal connection. However, if you have only one license, it fails and displays the message:

Micro Focus LMF - 005: You have exceeded the license limit for this product

This is because the terminal name for the debug session is set by the operating system and is not the same as the terminal name used by the SDE itself. License Manager, therefore, considers the two terminal sessions to be two different sessions, and requires them to have a license each.

You should either tell your developers not to run the SDE with COBSW=+A, or obtain extra licenses.

Recovering from a Corrupt License Database

If the database is deleted or damaged, you cannot restore it from a backup. You can recover it using the utility lmfdbrecover and then reinstalling the licenses. This utility deletes the license database and any system associated files and recreates the database. It starts the License Management Facility and prompts you to reinstall the licenses.

To recover from a corrupt database:

  1. Go to the directory where the License Management Facility is installed, /opt/microfocus/mflmf.
  2. Run the utility lmfdbrecover, by entering:
    sh lmfdbrecover 
  3. Reinstall the licenses as described earlier.

If the deployment license database is damaged, you can recover it using a similar utility aslmdbrecover. See the section Recovering from a Corrupt Database in the chapter Installing and Administering Licenses in your Deployment Licensing Guide