Sun WorkShop Installation and Licensing Reference

Chapter 2 License Management

This chapter describes Sun's user licensing scheme and gives detailed information about administering licenses.

Answers to Sun WorkShop licensing frequently asked questions (FAQ) are available through the World Wide Web by visiting the following web page:

http://www.sun.com/workshop/workshopFAQ.html

Sun's User License Scheme

Sun uses GLOBEtrotter Software, Inc.'s FLEXlm license manager software to manage Sun WorkShop user licenses.

The machine running the license manager daemon is called the license server. Requests come from application servers. An application server is any computer on which an application is installed.

The License File

The license administrator installs the license file (licenses_combined file), which is a text file that contains licensing data. This file contains information about the server nodes and vendor daemons and at least one line of data (FEATURE or INCREMENT) for each licensed product.

The license file, or a copy of it, must be accessible to every machine running the licensed software and each machine designated as a license server. This file is located on the license server in the /etc/opt/licenses directory.

To display all installed licenses, type:

% cd /etc/opt/licenses

% lmstat -a -c licenses_combined

For more information, see the lmstat man page.

Elementary License Files

The elementary license files are subsets of the licenses_combined file. Elementary license files are located in the install-directory/SUNWspro/license_dir directory on each application server (the default install-directory is /opt). License files for Sun WorkShop products have file names in the form sunpro.lic,n (for example, sunpro.lic,1). The n is a string, usually an integer, assigned during installation to identify a particular license file.

Sun WorkShop software checks the installation directory for licenses. The product software automatically looks for the elementary license file relative to where it was installed.

In a multiple independent license server configuration, application servers might be served by more than one license server. Each license server is represented by an elementary license file on the application servers. Each application server must contain at least one elementary license file. Each elementary license file contains the license server information and the product license.

The License Manager Daemon

The license manager daemon starts and restarts the vendor daemons, which grant or deny licenses to the licensed software. When a user starts an application, the application looks at the elementary license file for the name of the license server and contacts the license manager daemon (lmgrd.ste) on that server. If a license token is available, the user is granted the use of the application. If a license token exists but is not currently available (for example, if other users have checked out all the license tokens), the user will be put into a queue.


Note -

Sun uses the lmgrd.ste license manager daemon, which is identical to FLEXlm's lmgrd license manager daemon.


The Vendor Daemon

The license manager daemon handles communication between the application and the vendor daemon. The vendor daemon, which runs on the license server, tracks which users have licenses for a given product, how many licenses are checked out, and how many licenses are currently available. Sun WorkShop 5.0 products use the sunwlicd vendor daemon (releases prior to Sun WorkShop 5.0 used the suntechd vendor daemon). If the vendor daemon terminates, users lose their licenses. When the license manager daemon restarts the vendor daemon, users regain their licenses automatically.

Sun WorkShop Software

Sun WorkShop software is linked with the program module (the license library) to communicate with the license server. When the software is in use, it communicates with the vendor daemon to request a license.

The daemon_options File

The daemon_options file is installed in the /etc/opt/licenses directory. The daemon_options file allows you to:

When lmgrd.ste starts the vendor daemon, the vendor daemon receives the location of the daemon_options file. This location is identified in the product's license file on the DAEMON line. If no file is listed, the daemon will not use any options file. Only one options file per vendor daemon is allowed.

To modify the daemon_options file, use the options listed in Table 2-1. For feature names, see Appendix A in Sun WorkShop Quick Install.

Table 2-1 daemon_options Options

Command 

Description 

EXCLUDE

Denies a user access to a feature 

EXCLUDEALL

Denies a user access to all features of this vendor daemon 

GROUP

Defines a group of users for use with other options 

HOST_GROUP

Defines a group of hosts for use with other options 

INCLUDE

Allows a user access to a feature 

INCLUDEALL

Allows a user to access all features served by this vendor daemon 

LINGER

Causes licenses to be held by the vendor daemon for a period of time after the application checks them in or exits 

MAX 

Limits use for a particular feature/group and prioritizes use among users 

NOLOG

Turns off logging of certain items 

RESERVE

Saves licenses for a user 

#

Specifies that the text that follows is a comment, not a command 

The following is an example of a daemon_options file:


#Don't log IN, OUT, and QUEUED
NOLOG IN
NOLOG OUT
NOLOG QUEUED
LINGER workshop.c.sparc 300
LINGER workshop.cc.sparc 300
#RESERVE number feature {USER | DISPLAY | GROUP} name
#INCLUDE feature {USER | DISPLAY | GROUP} name
#EXCLUDE feature {USER | DISPLAY |GROUP} name
RESERVE 1 workshop.c.sparc USER pat
RESERVE 3 workshop.tools.sparc USER lee
EXCLUDE workshop.c.sparc USER joe

The sample daemon_options file was edited to specify:


Note -

For redundant server configurations, the daemon_options file must be the same on each server. For multiple independent server configurations, the daemon_options file can be different on each server.


To minimize server down time when changing the daemon_options file, follow these steps:

  1. Make the needed changes to the daemon_options file.

  2. Stop the license daemon.

    See "Stopping and Restarting the License Daemons".

  3. Restart the license daemon.

    See "Stopping and Restarting the License Daemons".


    Note -

    If you modify the daemon_options file, your changes do not take effect until the license daemon is started or restarted.


For more information about the options file, visit the GLOBEtrotter Software, Inc. site on the World Wide Web:

http://www.globetrotter.com/chap5.htm

License Administration

Various licensing issues can arise that might prohibit use of your licensed software. This section refers you to relevant man pages or gives you instructions to:

In addition, this section lists important file names and paths and how to get additional help.

Table 2-2 describes the license administration utilities that are available to you.


Note -

The license administration utilities are located in /etc/opt/licenses.


Table 2-2 License Administration Utilities in /etc/opt/licenses

Utility 

Description 

lmdiag

Diagnoses licensing problems when you cannot check out a license 

lmdown

Takes down the license daemons 

lmhostid

Reports a hostid for a system 

lmremove

Removes a user's license 

lmreread

Rereads the license files 

lmstat

Monitors the status of network licensing activities 

lmver

Identifies the FLEXlm version 

For more information about license administration, see the man pages for the utilities listed in Table 2-2 or visit the GLOBEtrotter Software, Inc. site on the World Wide Web at:

http://www.globetrotter.com/chap6.htm

Explanations of FLEXlm error messages are available through the licenses_errors man page and the GLOBEtrotter site on the World Wide Web at:

http://www.globetrotter.com/chap10.htm

For feature names, see Appendix A in Sun WorkShop Quick Install.

Using lmhostid to Get the Hostid for a System

Use lmhostid to report a system's hostid. See the lmhostid man page for more information.


Note -

You do not have to be a superuser to use the lmhostid utility.


Using lmver to Identify Your FLEXlm Version

The lmver utility reports the FLEXlm license manager software version that you are using. See the lmver man page for usage and options.


Note -

You must be a superuser or a designated user through the adjust_flexlm_owner script (see the adjust_flexlm_owner man page) to use the lmver utility.


Checking That Licenses Are Installed

To find out if your licenses are installed, follow these steps:

  1. On the license server, make sure there is a licenses_combined file in the directory /etc/opt/licenses.

  2. On each application server, make sure all elementary license files are in the directory install-dir/SUNWspro/license_dir.

    The elementary license file name is similar to sunpro.lic,n.

    If your licenses are not installed, see Chapter 4 in Sun WorkShop Quick Install.

Logging Licensing Activities

There are two log files:

Follow these steps to enable logging of license checkouts and checkins:

  1. Open the /etc/opt/licenses/daemon_options file in your preferred text editor.

  2. Put a pound sign (#) in front of the NOLOG IN, NOLOG OUT, and NOLOG QUEUED lines so that the lines look as follows:

    #NOLOG IN #NOLOG OUT #NOLOG QUEUED

    The pound sign (#) comments out these lines.

    To discontinue logging, remove the pound sign from the NOLOG IN, NOLOG OUT, and NOLOG QUEUED lines in the daemon_options file.

  3. Stop and restart the license daemons.

    See "Stopping and Restarting the License Daemons".

Stopping and Restarting the License Daemons

Under the following circumstances, you must stop and restart the license daemons:

Using lmdown to Stop the License Daemons

When you run the lmdown command, the following events occur:

  1. A message is sent to the license daemon requesting that it shut down.

  2. The license daemons complete the current log file message and close the file.

  3. The license daemons remove all the licenses that have been given out. The next time a user calls a program and the client server goes to verify the license, the license will be invalid.


    Note -

    If you have a redundant server configuration, using the lmdown utility takes down all of the redundant servers.


See the lmdown man page for usage and options.

Restarting the License Daemons

To restart the license daemon, type the following at the command line:

# /etc/rc2.d/S85lmgrd

The output of this command is directed to the /usr/tmp/license_log file. See also the lmgrd.ste man page.


Note -

If you use a redundant license server configuration, restart the license daemon on each server.


Using lmdiag to Diagnose License Problems

Using the lmdiag utility, you can investigate why users cannot check out a license. See the lmdiag man page for usage and options (for feature names, see Appendix A in Sun WorkShop Quick Install).


Note -

You must be a superuser or a designated user through the adjust_flexlm_owner script (see the adjust_flexlm_owner man page) to use the lmdiag utility.


Using lmstat to Monitor Licensing Activities

The lmstat utility monitors:

See the lmstat man page for usage and options.


Note -

You do not have to be a superuser to use the lmstat utility.


Changing the License Server hostname

If you must change the hostname on your license server, modify the hostname listed in the /etc/opt/licenses/licenses_combined file and the elementary license file(s).

Changing License Servers

If the license server referred to in the elementary license file (sunpro.lic,n) is down and you have a second license server, copy and run the second license server's /etc/opt/licenses/LIC_CONFIG_SCRIPT file on the application server, which creates an elementary license file on the application server for the second license server.

If you need a new password because you are upgrading or repairing your license server, contact the same Sun License Center that you originally contacted for your original password. You are allowed two moves of a license from one license server to another per calendar year. Sun may grant additional moves at its discretion. Moves are recorded and subject to audit. At the time of the request, the Sun License Center operator might require written confirmation that the old license password has been deleted.

Getting License Information

To get information about the licenses used by a compiler, use the -xlicinfo parameter. For example, for the C compiler type:

% cc -xlicinfo

Upgrading Your Operating System

If you upgrade your operating system, you must save the /etc/rc2.d/S85lmgrd file and everything in the /etc/opt/licenses directory. Restore the files when you have completed the system upgrade.

Using lmreread to Reread the License File

When you run the lmreread utility, the license daemon starts any new vendor daemons and signals all pre-existing daemons to reread the license files for changes in feature licensing information. See the lmreread man page for options and usage.

Under the following circumstances, you cannot use lmreread to restart the license daemons (see "Stopping and Restarting the License Daemons"):

Using lmremove to Remove a User's License

There may be times when checked-out licenses are not able to be returned to the license server because an application quits abnormally. To regain use of the license token, remove a user's license with the lmremove utility. See the lmremove man page for more information.


Note -

You must be a superuser or a designated user through the adjust_flexlm_owner script (see the adjust_flexlm_owner man page) to use the lmremove utility.


Recovering a Lost License

A license may be reported in use when it is not. This can be caused by the length of time licenses are held by the vendor daemon after the application checks licenses in or exits (the length of time set by the LINGER option in the daemon_options file) or if a system goes down while licensed software is in use. Use the lmstat command to get the status of the active licenses (see the lmstat man page for usage and options). If a license is reported in use when it is not being used, use the lmremove man page to recover the license (see the lmremove command for usage and options).

Releasing a License

If a user checks out a license and then the user's machine crashes, the license will be unavailable until the next refresh time, usually only a few minutes. If the linger period has expired (the length of time set by the LINGER option in the daemon_options file) and the license is still unavailable, use the lmremove command to free the license (see the lmremove man page for usage and options).

File Names and Paths

The following is a list of file locations you might need:

Additional Help

Answers to frequently asked questions (FAQ) about Sun WorkShop licensing are available through the World Wide Web by visiting the following web page:

http://www.sun.com/workshop/workshopFAQ.html

If you have licensing questions that are not answered in this reference or through the FAQ, contact your Sun authorized service provider and have the following information available: