Chapter 6. SoftWindows licensing
Prev |  | Next

## Chapter 6. SoftWindows licensing

This chapter gives additional information about the FLEXlm licensing system and explains how to use the SoftWindows License Manager to modify a license.

SoftWindows is supplied with FLEXlm version 3.0.

## The FLEXlm licensing system

SoftWindows uses a licensing system called FLEXlm, which lets you administer the licenses for all users on a network from a single workstation. This workstation is known as the license server. The FLEXlm system is widely used by a number of different software manufacturers, and one license server is sufficient to control any number of software products on the network.

The license server runs a licensing daemon, lmgrd, which invokes a specific daemon for SoftWindows, called insignia. The licensing daemon accesses a license data file, license.dat, which contains information about the license server and the licensed products. By default, this file is located in the directory, install/FLEXlm, where install is the SoftWindows installation directory.

A typical license.dat file looks like the following example:

    SERVER waltz 35648797 744
    DAEMON insignia /usr/SoftWindows2/FLEXlm
    FEATURE Insignia_SoftWindows insignia 2.000 1-Jan-01 1
    BBE82091CF80F95936F2 “4100 0000 1000 0001”

The SERVER line specifies the location of the server.

The DAEMON line specifies the pathname of the insignia licensing daemon.

The FEATURE line specifies the licensing information for SoftWindows. Note that this is one line that may wrap onto two lines when displayed, as shown in the example.

The SERVER and DAEMON lines are added to the license.dat file by the License Manager dialog box and may be modified later by the user.

The license.dat file is generated by the License Manager dialog box, which is displayed automatically when SoftWindows is run as root with no license server running. It can also be displayed by choosing Licensing from the Actions menu.

If you are installing a demo license, no license server is needed. If you are already using FLEXlm, you should install a demo license on your existing license server.

### The TCP port number

FLEXlm runs over TCP and uses the socket assigned in the license.dat file on the server. For example, in the line:

    SERVER waltz 35648797 744

744 is the TCP port number which the software has assigned to FLEXlm. This number can be changed but 744 is the default.

The TCP number is important, because if the system in the above example is a license server, FLEXlm uses this number to locate the server for users on other systems. To do this, each user must set their LM_LICENSE_FILE environment variable, which takes the form port @ server. Thus, to use the above license server, LM_LICENSE_FILE should be defined as follows for a C shell:

    setenv LM_LICENSE_FILE 744@waltz

or for a Bourne or Korn shell:

    LM_LICENSE_FILE=744@waltz; export LM_LICENSE_FILE

Alternatively, the variable LM_LICENSE_FILE can be set to reference the license file on the license server. For example, if you have a license server called licserv, and it contains a license file in a FLEXlm directory, which is NFS mounted under /servers/licserv, then LM_LICENSE_FILE could be set to /servers/licserv/FLEXlm/license.dat.

In this case, SoftWindows reads the SERVER line in the license file for the name of the license server to which the TCP port should be connected.

## Using FLEXlm

The procedures for starting and stopping FLEXlm must be carried out as root.

There are two ways to start FLEXlm using the lmgrd utility, in addition to using the user interface.

The examples in this section assume that the $SWIN2HOME environment variable has been set to the default installation location of SoftWindows.

### To start FLEXlm manually

The disadvantage of starting FLEXlm manually is that FLEXlm will need to be restarted if the machine is rebooted.

- Enter the command for the Bourne shell:

      $SWIN2HOME/FLEXlm/lmgrd -c $SWIN2HOME/FLEXlm/license.dat > $SWIN2HOME/FLEXlm/lmgrd.log 2>&1 &

| Note: This command should be typed on a single line.

### To start FLEXlm automatically

You can set up the license system so that it starts during the boot sequence of the license server as follows:

- Add the following line to the /etc/inittab file:

      isl:234:respawn:install/FLEXlm/lmgrd -c /install/FLEXlm/license.dat install/FLEXlm/lmgrd.log 2>&1

where install is the SoftWindows installation directory; for example, /usr/SoftWindows2.

| Note: Each of these commands should be typed on a single line.

- After adding the above line to the relevant system file, type the following command to start FLEXlm:

      /etc/init q

This causes the system to reread the /etc/inittab file.

### To shut down FLEXlm

The FLEXlm licensing system should be shut down before deinstalling SoftWindows, if it has been modified in any way from the default SoftWindows installation.

If FLEXlm were started manually:

- Type the following command:

      $SWIN2HOME/FLEXlm/lmdown

or, if LM_LICENSE_FILE is not set, enter:

    $SWIN2HOME/FLEXlm/lmdown -c $SWIN2HOME/FLEXlm/license.dat

If the system was started automatically and you want to remove FLEXlm proceed as follows:

- Delete the line that was added to the /etc/inittab or /etc/rc.local file, and enter the following command at the Unix prompt:

      install/FLEXlm/lmgrd -c
      install/FLEXlm/license.dat >
      install/FLEXlm/lmgrd.log 2>&1&

- where install is the SoftWindows installation directory./etc/inittab or /etc/rc.local file, and enter the following command at the Unix prompt:

      /etc/init q

This causes the system to reread the /etc/inittab file.

### To set up multiple license servers

At startup, SoftWindows contacts the license server to obtain a valid license. You can set up multiple license servers, so if there are no licenses available on the preferred server, SoftWindows will automatically ask for a license from the next named server.

To set up multiple license servers:

- Define the LM_LICENSE_FILE environment variable at the Unix prompt as follows:

For C shell users:

    setenv LM_LICENSE_FILE 744@waltz:755@tango

For Bourne or Korn shell users:

    LM_LICENSE_FILE=744@waltz:755@tango
    export LM_LICENSE_FILE

## Modifying SoftWindows licenses

SoftWindows includes a Licensing function that allows you to view the licensing information for your SoftWindows installation and, if necessary, update it if you want to extend the license period or add more users.

### To display the License Manager

1. Log in as root.

2. Run the appropriate window manager (VUE, OpenWindows, IBM CDE, or Motif).

3. Run SoftWindows.

   An additional Licensing option will then be available on the Actions menu.

   Figure 6-1. Actions Menu

4. Choose Licensing from the Actions menu.

   This dialog box displays the licensing information for your SoftWindows installation:

   Figure 6-2. FlexLM License Manager Menu

### To install a new license

1. Choose the type of license by selecting Demonstration or Concurrent as appropriate.

2. Enter the Serial Number, Expiry Date, Authorization Code, and the Number Of Users in the appropriate text boxes.

3. Choose Install License to install the new license.

| Note: If Demonstration has been selected as the license type, the Number Of Users field is disabled. Alternatively, if the license type Concurrent is selected, the Expiry Date is automatically set to 1/1/0 and should not be changed.

### To run SoftWindows on a network that is currently using FLEXlm

1. Copy the relevant details from the file $SWIN2HOME/FLEXlm/license.dat into your own license.dat file, and remove the original file. Insignia can supply authorization codes for multiple redundant servers so that large networks are not totally reliant on one machine.

   This level of complexity is not supported by the SoftWindows license manager dialog box, so the files must be edited manually.

2. Set up the LM_LICENSE_FILE environment variable for each user, to specify the location of the existing license file.

For a C shell user, add one of the following lines to the “.login” file:

    setenv LM_LICENSE_FILE 744@machine
    setenv LM_LICENSE_FILE /net/machine/install/FLEXlm/license.dat

- In the first case, enter the appropriate TCP port number and machine name.

- In the second case, enter an appropriate path through an NFS mount to the license file on the license server.

For a Bourne shell user, add one of the following lines to the “.profile” file:

    LM_LICENSE_FILE=744@machine; export LM_LICENSE_FILE
    LM_LICENSE_FILE=/net/machine/install/FLEXlm/license.dat; export LM_LICENSE_FILE

- In these examples install is the SoftWindows installation directory.

### To change the TCP port used for licensing

The TCP port used for licensing can be changed to avoid a clash with another TCP service on the standard port. You should only do this if you are experienced in using the Unix system.

1. Log in as root.

2. Choose Licensing from the SoftWindows Actions menu to display the license manager dialog box.

3. Choose Advanced to display the TCP Port section of the dialog box:

   Figure 6-3. FlexLM License Manager Menu

4. Enter a new TCP port number.

| Note: If you enter an invalid port number, SoftWindows will not work.

## Licensing SoftWindows with other products using FLEXlm

If other products on your network use FLEXlm licensing, a conflict may occur with the SoftWindows licensing system.

This section discusses how to avoid this problem.

### Products using the same license servers

In this case, there are two solutions:

1. The end-user can keep both license files separate, running two copies of lmgrd, one for each license file.

   There is no drawback in this approach, since each lmgrd requires few system resources and takes almost no CPU time.

2. You can combine license files by retaining the set of SERVER lines from any one license file and adding all the other lines (DAEMON, FEATURE, INCREMENT, UPGRADE, and FEATURESET lines) from all the license files. The combined license file can be located in the default location, /usr/local/flexlm/licenses/license.dat, or in any convenient location (which must be set in the LM_LICENSE_FILE environment variable). Alternatively, multiple copies of the file can be located at fixed locations as required by each software vendor.

You must create a symbolic link between the location of the license file and the location where each software package expects to find its license file.

| Note: Experienced system administrators often prefer to combine license files; otherwise you are advised to keep these files separate.

### Products using different license servers

In this case, separate license files will be required, one for each distinct set of license servers. Where multiple software vendors use the same set of license server nodes, the technique described in the previous section can be used to combine their license files. The resulting (multiple) license files can then be installed in convenient locations, and the user's LM_LICENSE_FILE environment variable should be set as follows.

    setenv LM_LICENSE_FILE 1fpath1:1fpath2:....:1fpathN

where 1fpath1 is the path to the first file, 1fpath2 is the path to the second license file, and so on.

When products from different vendors use different versions of FLEXlm, always use the latest versions of the lmgrd and the lmutil utilities. If any products use a version of FLEXlm before v2.0, then the -b startup argument must be used for lmgrd.

The latest version of lmgrd will always support any FLEXlm license. The end-user must verify which lmgrd is the latest version. This can be done using lmgrd -v to get the version information. If you are using a version of lmgrd earlier than the version the vendor is using, error messages may appear such as:

    Vendor daemon cannot talk to lmgrd (invalid returned data from license server).

### FLEXlm version compatibility

When an end-user has licensed products that incorporate various versions of FLEXlm, care must be taken to insure that the correct versions of lmgrd and the FLEXlm utilities are used.

If the utility programs are FLEXlm v2.4 or later, the latest utility programs should be used. If the utility programs are older than v2.4, the oldest (lowest version number) utility programs should be used. This is because the newest lmgrd knows how to support all versions of the vendor daemons, whereas utilities prior to FLEXlm v2.4 do not know how to communicate with the older vendor daemons. After FLEXlm v2.4, the utility programs automatically back off their communications version to enable them to work with all versions of the FLEXlm daemons.

To determine the version of any FLEXlm-based product, use the following command as root:

    strings program_name | grep Highland | grep -i flex

Once you have determined the versions of all software you want to use, perform the following procedure:

1. Use the highest numbered lmgrd that you have.

2. Use the FLEXlm utilities that correspond to the oldest client or vendor daemon that you have in use or use the newest utilities if they are FLEXlm v2.4 or newer.

If you have vendor daemons with different FLEXlm versions:

- If all vendor daemons are later than v2.0, use the latest lmgrd with no options.

- If you have all FLEXlm v1.x and v2.1 and the newer vendor daemons, use the latest lmgrd with the -b option.

- FLEXlm v1.x and v2.0 daemons cannot be combined. If you have a combination that includes FLEXlm v1.x and v2.0 daemons, keep them in separate files. Group them so that they follow the two guidelines above. Note that few vendors use v2.0 daemons.

## License administration tools

This section describes the license administration tools supplied with FLEXlm. The commands for the tools are contained in a single utility, lmutil, and can be run by typing one of the following commands:

    lmutil commandname
    commandname

All the utilities take the following arguments:

Table 6-1. FlexLM Command Names

Argument | Description
--- | ---
-v | Print version and exit
-c license_file | Operate on license_file

| Note: The lmdown, lmremove, and lmreread commands are limited to privileged users. If you have started lmgrd with the -p switch, you must be a license administrator to run any of these three utilities. A license administrator is a member of the Unix lmadmin group or a member of group 0, if the lmadmin group does not exist.

The file lmgrd.log contains a log of all FLEXlm activities, and provides useful information for debugging FLEXlm.

### lmcksum

Performs a checksum of a license file, and prints a line-by-line checksum for the file as well as an overall file checksum. This can be used to verify that a license has been entered correctly.

By default, lmcksum operates on license.dat in the current directory and may be invoked with an optional daemon name. If this is specified, only license file lines for the selected daemon are used to compute the checksums.

### lmdown

Shuts down all license daemons (both lmgrd and all vendor daemons) on all nodes.

The utility shuts down all daemons specified in the default license file, which is vendor-specific, or in the license file pathname as defined by the environment variable LM_LICENSE_FILE.

By default, the SoftWindows licensing is automatically restarted by a line in the file /etc/inittab (or on SunOS at reboot by a line in /etc/rc.local). For details of how to shut down FLEXlm refer to Chapter 6, “To shut down FLEXlm”.

### lmhostid

Prints the host ID value on any machine supported by FLEXlm.

To obtain the host ID you should enter:

    lmhostid

### lmremove

Removes a user's license for a specified product and returns the license to the pool of available licenses.

This could be required if there is a system failure on the node where the user is running the software. Due to the way TCP works it can take several hours for the license server to detect that the user's system has failed. This situation sometimes leaves the license in an unusable state.

#### Syntax

    lmremove [-c file] feature user host display

The user host display information is obtained from the output of the command lmstat -a.

The lmremove utility removes all instances of user on host on display from usage of feature. If the optional -c file parameter is specified, the indicated file is used as the license file. You should protect the execution of lmremove, since removing a user's license can be disruptive.

### lmreread

Instructs the license daemon to reread the license file and start all new vendor daemons that have been added. In addition, all preexisting daemons will be signaled to re-read the license file for changes in feature-licensing information.

If an optional daemon name is specified, only the named daemon will re-read the license file. In this case, lmgrd does not re-read the license file.

### lmstat

Displays the status of all network licensing activities to allow you to monitor license management operations, including:

- Which daemons are running

- Users of individual features

- Users of features served by a specific daemon

The lmstat utility allows the following options:

Table 6-2. lmstat utility options

Option | Description
--- | ---
-a | Display all licensing information.
-A | List all active licenses.
-c license_file | Use license_file.
-S [daemon] | Restrict output to one daemon, and the features and users of that daemon.
-f [feature_name] | List users of named feature or all features if no feature name is given.
-i [feature_name] | Prints information about the named feature or all features if no feature name is given.
-l [regular expression] | List users of matching license(s).
-s [server_name] | Display status of named server node or of all servers if no server name is given.
-t value | Set lmstat timeout to value.

| Note: The command lmremove uses the output from lmstat -a.

### lmswitchr

Switches the report writer (REPORTLOG) log file for the specified feature.

### Imver

Reports the FLEXlm version of the library or binary. Usage is:

    lmver [filename]

If filename is specified, the FLEXlm version incorporated into this file is displayed; otherwise lmver looks for the library file liblmgr.a to detect its version.

## Hostids for FLEXlm-supported machines

FLEXlm uses different machine identifications for different machine architectures. For this reason, the Ethernet address is used on some platforms as the host ID.

An Ethernet address is a 6–byte string, with each byte comprising two hexadecimal digits. You should specify all 12 hex digits when using an Ethernet address as a hostid. For example, if the Ethernet address is 8:0:20:0:5:ac, you would specify 0800200005AC as the hostid.

The program lmhostid will print the exact hostid that FLEXlm expects to use on any host. To obtain the host id for your system enter the following from a UNIX shell:

    echo `/etc/sysinfo -s` 16op | dc

Prev | Table of Contents | Next
Chapter 5. Additional installation information |  | Chapter 7. Configuring SoftWindows