Working with the License Manager

If your license type requires a License Manager, you must ensure that the License Manager is running. The License Wizard will step you through the process of installing the License Manager and configuring your system so that it starts automatically. This section describes how to start the License Manager manually or configure it to start automatically if you are not using the License Wizard.

Starting the License Manager

Note
If the license unit count on your license.dat file's INCREMENT line is "0" or "uncounted," then you do not need to start the License Manager.

Windows

On Windows platforms, the LMTools support utility lets you start, stop, and see the status of the License Manager. (The License Wizard also starts LMTools.) You must have Administrator privileges. To start the License Manager on Windows:

  1. Select one of the following:
    • Start → Programs IDL x.x → LMTools
    • Start → Programs ENVI x.x → LMTools
    • The LMTools dialog appears.

  2. Click the Config Services tab and select the name of the License Manager service. If you installed the License Manager using the License Wizard, the default name is "ITT FLEXlm License Manager." To start the License Manager automatically at boot time as a service, check Use Services and Start Server at Power Up boxes. Click Save Services to save any configuration changes.
  3. Choose the Start/Stop/Reread tab and click Start Server to start the License Manager.
  4. Note
    For more on configuring the ITT License Manager service, see Creating Unique License Manager Services for Each Product.

Unix and Macintosh

Starting the License Manager requires no special privileges on Unix and Macintosh. Note the potential security ramifications of running the License Manager from a privileged account such as root or Administrator, as it can be started by any user. However, special privileges are required to shut down the License Manager. See Stopping the License Manager for more information. The same special privileges are required to install and start scripts that start the License Manager at boot time

On UNIX and Macintosh platforms, start the License Manager by entering the following command.

Note
You may be required to set up the environment to run IDL or ENVI before running the command. See Setting Up the Environment.

ITT_DIR/idlxx/bin/lmgrd [-c license_path] 

where ITT_DIR is the directory where you have installed IDL or ENVI, and license_path is the full pathname to the license file, including the license filename. The default license path is ITT_DIR/license/license.dat. If you have used this default location or have defined the LM_LICENSE_FILE environment variable (as described in Configuring Client Access to the License Manager), you do not need to specify the -c license_path option, although it is recommended to avoid ambiguity.

Multiple License Managers

If you have more than a single ITT FLEXnet License Manager running on a server, conflicts might exist among the License Managers. Before starting the License Manager, see Using the Same License Manager for Different Applications for more detailed information on customizing your license file.

Note
For additional information, see the Licensing section of the Tech Support Frequently Asked Questions page on the ITT Visual Information Solutions web site.

Configuring the License Manager to Start Automatically on UNIX and Macintosh

In most cases, you want the License Manager to start automatically each time your system starts. This ensures that the system can provide a license when one is requested.

This section describes how to configure the License Manager to start automatically on UNIX and Macintosh platforms if you are not using the License Wizard. (The License Wizard automatically performs these steps.)

Use one of the following methods to configure the License Manager to start at boot time (root privileges are required).

The boot-time startup script works with all supported operating systems. Consequently, if you have previously configured a system boot-time script that is different than the sys5_idl_lmgrd script, after you have installed the IDL or ENVI boot-time startup script, be sure to modify your other boot-time script so that a second instance of the ITT License Manager will not be started on the same system. Running two instances of the same vendor's License Manager on the same system causes a conflict that prevents the License Manager from working correctly.

Checking the License Manager Status

To check the License Manager status:

Windows

  1. Find the hostname and TCP/IP port number in the SERVER line of the license file (license.dat) used to start the License Manager service. For example, if the SERVER line looks like the following:
  2. SERVER myserver 12345678 1700 
     

    Then the hostname is myserver and the TCP/IP port is 1700.

  3. Open a Windows Command prompt window, and change directories to the idlxx\bin\bin.<platform> directory of your IDL or ENVI installation. For example:
  4. cd /d C:\Program Files\ITT\idlxx\bin\bin.x86 
    
  5. Issue an lmutil lmstat command at the prompt. For example:
  6. lmutil lmstat -a -c 1700@myserver 
     

    Where the TCP/IP port number and server hostname are those determined in Step 1. The output displays the status of licenses and users on the server.

UNIX and Macintosh

The lmstat program provides information about the status of the server nodes, License Managers, and currently checked out licenses. To run lmstat, change to your ITT_DIR/idlxx/bin directory, and enter a command using the following syntax:

lmstat [-a] [-A] [-c license_file] [-s [server]] 

For example: lmstat -a -c 1700@myserver

Optional flags for lmstat are shown in Table 8-1.

Table 8-1: Optional Flags for lmstat

Optional Flags for lmstat
-a 

This option displays all available information about the License Manager status. If this argument is not present, only a brief summary of the License Manager's state is given.

-A 

This option displays a list of all active licenses.

-c license_file 

This option defines the license file path or the port@host setting. If this switch is not specified, lmstat looks for the LM_LICENSE _FILE environment variable. If that environment variable is not set, lmstat looks for the file ITT_DIR/license/license.dat.

-s [server] 

This option displays the status of the specified server node(s).

Note that IDL might use a license source different from LM_LICENSE_FILE if IDL_LMGRD_LICENSE_FILE is defined in a .flexlmrc file (in the user's home directory that starts the license service) or as an environment variable.

Stopping the License Manager

To stop the License Manager:

Windows

Administrative privileges may be required.

  1. Select one of the following:
    • Start → Programs IDL x.x → LMTools
    • Start → Programs ENVI x.x → LMTools
    • The LMTools dialog appears.

  2. Click Stop Server in the Start/Stop/Reread tab to disable the selected License Manager. IDL will run in seven-minute demonstration mode without an available license.

UNIX and Macintosh

The lmdown program initiates a shutdown of all License Managers by sending a message to every License Manager asking it to shut down. If you selected the option at installation to use a log file, the License Managers write out their last messages to the log file, close the file, and exit. All licenses which have been given out by those managers are rescinded, so that the next time an IDL or ENVI process verifies its license, it will not be valid.

To run lmdown, change to your ITT_DIR/idlxx/bin directory and type lmdown at the UNIX prompt following the syntax below:

lmdown [-c license_file] [-q] 

Option arguments include -c, which defines the path to your license.dat file and -q, which runs lmdown in "quiet mode." If you do not specify the -q switch, lmdown asks for confirmation before asking the License Managers to shut down. If this switch is specified, lmdown does not ask for confirmation. It is recommended that you use the -c option to explicitly specify the license file or port@host reference when stopping the License Manager, especially when multiple License Managers are running on your network.
(For example: lmdown -c 1700@myserver).

Unauthorized use of the lmdown command can be disruptive; when the License Manager shuts down, all current IDL or ENVI sessions are terminated. Verify that the file access modes on your system are secure. It is recommended that you set the permissions for lmdown using the following UNIX command:

chmod 500 ITT_DIR/idlxx/bin/lmdown 

Logging (UNIX and Macintosh)

The License Manager writes a log of its activities to its standard output. If you do not want to keep a log, you can redirect the standard output to the null device (/dev/null) by starting the License Manager with the command:

ITT_DIR/idlxx/bin/lmgrd > /dev/null 

It is also possible to direct the log to the system console with the command:

ITT_DIR/idlxx/bin/lmgrd > /dev/console 

If you want to keep a permanent log file, you should choose a location on your system where a growing log will not cause disk space problems. On Sun systems, the /var/adm directory is a reasonable choice.

Reclaiming Unused Licenses (UNIX and Macintosh)

If you are running licensed IDL or ENVI when the machine crashes, the license that was in use might not be returned to the server. In this case, the license is not available to other users. The lmremove program allows the system administrator to remove a single user's license for a specified feature and allows the license to return to the pool of available licenses.

Do not use lmremove to return a license that is being used by an active IDL or ENVI session. Use the command only to reclaim licenses from sessions that are no longer active.

To free a license, first gather information using the status command, lmstat. To run lmstat, change to your ITT_DIR/idlxx/bin directory and type:

lmstat -A | more  

This shows the status of License Managers as well as checked-out licenses. For example the following line shows user "robin" has a license for IDL checked out from the server "hal7," which is being displayed on the host "josh":

robin hal7 josh/:0 (vx.x) (hal7/1700/395), start Mon 10/12 4:34, # 
licenses 

The format of this line is:

user host display (version) (host/port/license_handle), 
start_date, #_of_available_licenses 

To free the license held by user "robin," note the user, host, and display values. Then remove the license with the following lmremove syntax:.

lmremove idl robin hal7 josh/:0 

where idl (or envi) is the feature, robin is the user, hal7 is the host, and josh/:0 is the display. Other feature values appear in the table below. You can check to make sure the license was freed by typing the following at the UNIX command prompt:

lmstat -A | more 

The license you just removed should no longer appear in the list of licenses checked out.

To determine the possible values of the feature parameter, inspect the license.dat file.

Finding the Host ID (UNIX and Macintosh)

You need to know the host ID when combining license files from different vendors. (See Combining License Files.)

The lmhostid program obtains a unique FLEXnet host ID from your machine. To run lmhostid, change to the directory, ITT_DIR/idlxx/bin, and type lmhostid at the UNIX prompt. The output of lmhostid looks like this:

lmhostid - Copyright (C) 1989-2007 Macrovision
The FLEXnet host ID of this machine is "8002add0" 

The system hostid command might not return the same required FLEXnet value that the lmhostid command returns.

Running Old and New Versions of IDL or ENVI Concurrently

In many cases, you can run older versions of IDL or ENVI concurrently with the most recent version. If a FEATURE line has the version number 7.100, for example, it will allow IDL 7.1 and all earlier versions of IDL to run. In some cases, new License Manager capabilities such as the INCREMENT line might prevent older versions of IDL or ENVI from working with the latest version of the License Manager.

You should start the License Manager from the latest IDL/ENVI distribution and use the new license file with the older IDL/ENVI distribution. The old IDL/ENVI license information should not be combined with the new license information. The License Manager should only be started once from the new distribution. It should not be started from an old IDL/ENVI distribution.

Using the Same License Manager for Different Applications

Macrovision's FLEXnet Publisher (formerly the FLEXnet License Manager) is used as the network license management facility for IDL and ENVI. Since this License Manager is not unique to ITT Visual Information Solutions software, you may need to run software from two or more software vendors that all use FLEXnet. In this case, you may find License Manager conflicts.

You have the following options if multiple products using FLEXnet have licenses served from the same license server:

Combining License Files

If IDL/ENVI and other vendor products also using FLEXnet will be using the same license server to administer licenses, and if all of the vendor license files are compatible, you can combine the license files in a single license file.

Different FLEXnet vendor licenses are compatible for combination if the LMHostid value on the SERVER line for each file is exactly the same. For example, if the SERVER line in two different vendor license files is the following:

SERVER server1.acme.com 12345678 1700 

and

SERVER server1 12345678 1800 

You can combine the licenses into a single license file using either of the SERVER lines above, because the third item is the same in both (12345678).

Warning
Manually combining the information from multiple separated ITT Visual Information Solutions license.dat files that contain a SERVER line will invalidate the license and prevent the License Manager from running. The newest version of our product license file will normally work with previous versions of the supported products.

After shutting down the license servers, use a text editor to create a single license file. In this single license file, combine all license files by taking the SERVER lines from any one license file and adding all the DAEMON, FEATURE, FEATURESET, and INCREMENT lines from all of the license files.

Place copies of this combined license file in the locations required by the various software vendors. Alternatively, a single copy of the license file can be located in any convenient location, in which case each client machine must set the LM_LICENSE_FILE environment variable to point to it. For more information, see Configuring Client Access to the License Manager.

Windows

When you have edited the license file and saved it in the appropriate locations, restart the License Manager with the most recent version of the License Manager daemon (lmgrd) that you have installed. To determine the version of the License Manager daemon program (lmgrd.exe):

  1. Launch a MS-DOS command prompt.
  2. Change directory (use the cd command) to ITT_DIR\idlxx\bin.<platform>, where ITT_DIR is the main installation directory.
  3. Enter the following command at the prompt:
  4. lmgrd -version 
    

The output should look something like the following example:

lmgrd v11.4.100.0 build 50818 i86_n3 ... 

If an older version of lmgrd is used, the License Manager from the product with a more recent lmgrd may not operate correctly.

Changes to an altered license file will not take effect until the License Manager is restarted using that license file.

Unix and Macintosh

IDL might use a license source different from LM_LICENSE_FILE if IDL_LMGRD_LICENSE_FILE is defined in a .flexlmrc file or as an environment variable. For more information, see License Sources.

If you are on a client machine, you can also set your environments to point to the port@host setting of the license server.

After saving the license files in the appropriate locations, restart the License Manager with the most recent version of the License Manager daemon (lmgrd) that you have installed. If an older version of lmgrd is used, the License Manager from the product with a more recent lmgrd will not operate correctly. To determine the version of lmgrd, run the lmgrd program with the -version switch. For example:

/usr/local/itt/idlxx/bin/lmgrd -version 

The output should look something like the following:

lmgrd v11.4.100.0 build 50818 i86_n3 ... 

If you do not combine license files or if the vendor license files are not compatible, you have the option of starting a separate License Manager for each vendor's license file on the same single license server.

Creating Unique License Manager Services for Each Product

As an alternative to combining the license information from multiple vendors' licenses and running a single instance of the FLEXnet License Manager service, you can install and start a separate instance of the FLEXnet License Manager service (with a unique name) for each separate vendor's license file.

Using separate instances of the FLEXnet License Manager service with separate vendor licenses requires administering multiple services and license files. However, multiple License Manager services and separate vendor license files let the system administrator stop and start FLEXnet services freely for particular vendors without regard for other vendors' FLEXnet services running on that same system.

Note
Make sure that only one instance of the FLEXnet License Manager will start on the server machine with respect to any IDL or ENVI license file. If an instance of the FLEXnet License Manager service is already running for IDL or ENVI on this same license server, then installing a second instance of the FLEXnet service for IDL or ENVI under a different name can cause a conflict when Windows is loaded. (To resolve such a conflict, stop all but one of the conflicting FLEXnet services immediately after logging on to that license server.)

If the products use different server sessions, a local or shared network copy of each vendor license file is required on each client machine, or a port@host reference might be necessary. The copy of the license file or port@host reference directs the request for a license to the proper server. You will also need to set the existing LM_LICENSE_FILE variable to include the new product's license file path or a port@host reference.

Windows

After verifying that there is not already an IDL or ENVI configured License Manager service running on your server machine, you can configure a uniquely named instance of the License Manager service for IDL or ENVI to avoid conflict with other vendors' License Managers.

Note
Only one instance of an ITT (or RSI) product FLEXnet License Manager service can be running on a machine at any one time. Running multiple instances of the ITT FLEXnet service at the same time will prevent the License Manager service from operating correctly.

To install a unique instance of the FLEXnet License Manager for an IDL or ENVI product license file:

  1. Confirm that your updated license is already properly installed on the license server.
  2. Select one of the following to start LMTools:
    • Start → Programs IDL x.x → LMTools
    • Start → Programs ENVI x.x → LMTools
    • The LMTools dialog appears.

  3. Click on the Config Services tab.
  4. Select an existing service name if you have previously configured an ITT (or RSI) FLEXnet (formerly FLEXlm) License Manager service, you can select this item from the Service Name pull down list to modify. (A service name cannot be changed. If you want to use a different service name, use the instructions in the following step.)
  5. Or

  6. If you are installing an ITT FLEXnet License Manager service for the first time, do the following:
    • Delete the currently shown text in the Service Name pull-down list. Note that this does not delete an existing service profile; it is simply a method to add a new profile.
    • In the blank Service Name field, enter the name of the new FLEXnet service to add. The default service name for ITT products is "ITT FLEXlm License Manager. "
    • Press the Tab key to leave the Service name field. Notice that any previously shown path settings will disappear. This does not affect the existing FLEXnet service profiles.
  7. Configure or reconfigure the path settings for the FLEXnet service profile by browsing (with the Browse buttons) or entering file paths into the appropriate fields:
    • Path to the lmgrd.exe file—The default path for the License Manager daemon in IDL 7.1 is:
    • C:\Program Files\ITT\IDL71\bin\bin.x86\lmgrd.exe 
      
    • Path to the license file—The default path for IDL 7.1 is:
    • C:\Program Files\ITT\license\license.dat 
      
    • Path to the debug log file—The debug log file directory must exist, but the debug file itself does not need to already exist. The default path for IDL 7.1 is:
    • C:\Program Files\ITT\license\lmgrd_log.txt 
      
  8. If you want the License Manager to start automatically at boot time as a service (recommended), check the User Services and Start Server at Power Up check boxes.
  9. Click the Save Services button to save any configuration changes. Confirm saving the changes when prompted.
  10. Finally, to start the License Manager, select the Start/Stop/Reread tab and click on the Start Server button. Exit LMTools. (Rebooting the system will also start the License Manager service.)

UNIX and Macintosh

IDL might use a license source different from LM_LICENSE_FILE if IDL_LMGRD_LICENSE_FILE is defined in a .flexlmrc file or as an environment variable. For more information, see License Sources.

For example, if you have an existing product named otherapp residing in the home directory, the LM_LICENSE_FILE environment variable would be defined as follows:

For C shell:

setenv LM_LICENSE_FILE /home/otherapp/license.dat  

For Korn or Bash shell:

export LM_LICENSE_FILE=/home/otherapp/license.dat 

Add an IDL or ENVI license file to the existing LM_LICENSE_FILE variable by separating the new application's license path from the existing one with a colon as follows:

For C shell (enter the following command as one line):

setenv LM_LICENSE_FILE 
/home/otherapp/license.dat:ITT_DIR/license/license.dat  

For Korn or Bash shell (enter the following command as one line):

export LM_LICENSE_FILE= 
/home/otherapp/license.dat:ITT_DIR/license/license.dat 

Where ITT_DIR is the installation directory.

If a local or network copy of the license file is not available, you can use a port@host reference in the LM_LICENSE_FILE definition. For example:

For C shell

setenv LM_LICENSE_FILE /home/otherapp/license.dat:1700@server1 

For Korn or Bash shell

export LM_LICENSE_FILE=/home/otherapp/license.dat:1700@server1 

Restart the License Manager with the most recent version of lmgrd that you have installed. The version number of lmgrd is displayed when it is started. You can also determine the version by running the lmgrd -version command. If an older version of lmgrd is used, the License Manager daemon that uses the product with a more recent version of FLEXnet will not operate correctly.

For starting and stopping the License Manager in an environment that has multiple license servers running, it is recommended that you use the -c switch for lmgrd to specify which license server you want to reference. For example, to start the License Manager with respect to an ITT Visual Information Solutions license file in the default location, issue the following command (as one line):

/usr/local/itt/idlxx/bin/lmgrd -c 
   /usr/local/itt/license/license.dat 

Saving the License File in an Alternative Location

It is strongly recommended that you save your license file with the default path and filename in the following location:

Windows:

ITT_DIR\License\license.dat 

UNIX and Macintosh:

ITT_DIR/license/license.dat 

Where ITT_DIR is the root installation directory.

If you put your license file in this directory, you do not have to redefine any environment variables.

If you choose a location other than these for the license file, it must be accessible to the IDL or ENVI program that you installed on your machine. Therefore, you must define the environment variable LM_LICENSE_FILE to point to the actual path of the license file prior to using IDL or ENVI. For example, if you save your license file as:

C:\flexnet.files\ittlicense.dat 

IDL and ENVI will not run properly until you define the LM_LICENSE_FILE variable. See Configuring Client Access to the License Manager for more information on LM_LICENSE_FILE.

Windows

Use the following steps to save the license file to an alternative location:

  1. Open the System control panel.
  2. Click the Advanced tab, and click the Environment Variables button. Click the New button below the System Variables box and enter the following information:
    1. Type, in uppercase letters, LM_LICENSE_FILE in the Variable Name field.
    2. Type the path to the license file in the Variable Value field: in this example, C:\flexnet.files\ittlicense.dat. Replace this value with the actual path to your license file.
  3. Save the settings.

UNIX and Macintosh

Use the following steps to save the license file to an alternative location:

  1. Modify your .cshrc, .profile, or .bashrc file using any text editor. You must define the UNIX environment variable for LM_LICENSE_FILE to point to the server and port of the machine running the License Manager. The syntax for the defining the environment variable is:
  2. port@host 
     

    For example, if you are running the License Manager on a machine named "hal" with a port of 1700, then enter the following:

    For C shell: setenv LM_LICENSE_FILE 1700@hal

    For Korn or Bash shell: export LM_LICENSE_FILE=1700@hal

    If LM_LICENSE_FILE has already been defined for another software product, the definition of this license file can be appended using a colon (:) as the delimiter. For example:

    /usr/local/myapplication/license.dat:1700@hal

    Or,

    $LM_LICENSE_FILE:1700@hal
  3. Log out and log back in to execute the .cshrc, .profile, or .bashrc file, or execute the file from the home directory using one of the following commands.
  4. For C shell: source .cshrc

    For Korn shell: . .profile

    For Bash shell: . .bashrc

Upgrading a Network License Manager

Windows

When the License Wizard installs the License Manager, it also automatically configures a service named "ITT FLEXlm License Manager" using default file settings.

If a previously configured License Manager with a different name is running on the same server administering your IDL or ENVI license file, it is recommended that you stop, then disable or remove, the previously configured service to avoid a potential system conflict caused by simultaneously running two License Managers on one machine.

To manually stop and remove the old License Manager service:

  1. Select one of the following:
    • Start → Programs IDL x.x → LMTools
    • Start → Programs ENVI x.x → LMTools
    • The LMTools dialog appears.

  2. Select the Config Services tab.
  3. From the Service Name drop-down list, select the older License Manager name that you would like to remove.
  4. You can identify the operational status of configured services in the Services control panel utility. If the Status field is "Started," the service is currently running.

    If the machine is serving licenses for other products that use the FLEXnet License Manager service, and you are unsure which is the unnecessary ITT Visual Information Solutions License Manager service, contact your system or network administrator for assistance.

  5. Select the Stop/Start/Reread tab. The selected License Manager service is highlighted.
  6. Click Stop Server to stop the service. If the selected service is not currently running, then clicking Stop Server displays a Status field message that verifies that LMTools is unable to stop the selected service (e.g., "Unable to Stop Server").
  7. After stopping the service, return to the Config Services tab and click Remove Service to complete the removal of the old License Manager.

UNIX

If you are upgrading to a newer version of IDL or ENVI, you should use the version of the FLEXnet License Manager that shipped with the latest version of IDL or ENVI. Newer versions of FLEXnet support applications that were built to work with older versions of FLEXnet. Using a newer version of IDL or ENVI with an older version of the License Manager (lmgrd) might not allow IDL or ENVI to operate correctly.

To determine the version of your License Manager, run the lmgrd program with the
-version switch. For example:

/usr/local/itt/idlxx/bin/lmgrd -version 

To upgrade the License Manager to run at boot time, issue the following commands at the command line:

cd ITT_DIR/idlxx/bin 
lmgrd_install 

Macintosh

To avoid problems, use the License Wizard or lmgrd_install to upgrade your License Manager. Root privileges are required to successfully use this command. If your system was manually configured to launch a previous version of the License Manager at boot time, you might need to uninstall or disable the older, manually created, /Library/StartupItems. Simultaneously running more than one License Manager on the same machine can result in a License Manager conflict.

The IDL or ENVI License Manager installation script creates a Library/StartupItems item called IDL_LMGRD. If you have another item in this folder with a different name (e.g., ITT_LICENSE) that launches the License Manager, remove the older, conflicting item.