PreviousInstalling AS Licenses Development System UsersNext

Chapter 3: Administering AS Licenses

This chapter describes how to administer AS licenses.

3.1 Monitoring License Use

You can monitor the use of AS licenses on your system using the AppTrack License Administration utility. To do this:

  1. Type:
    $COBDIR/aslmf/apptrack
  2. When prompted, enter your password.

    AppTrack displays a menu.

  3. Select option 2 (License Summary) from the menu.

    AppTrack displays a report showing the number of licenses installed, the number of licenses in system state, and the number of copies of an application running at that moment.

    Licenses in the system state are standard Application Server licenses that are in the first 30 seconds of usage by an application. The significance of this is that even if the application terminates immediately, its license is not freed until 30 seconds have passed. In the initial 30 seconds of usage by an application, the license is included in both the Sys column and the In Use column. After 30 seconds, the license is removed from the Sys column, but remains in the In Use column if the application is still running.

The report shows the number of installed AS licenses for each Application Server, and how many of those licenses are in use. Entries that follow **Developer Usage refer to AS licenses that have been automatically installed by a Micro Focus Development System. For each Development System license unit, five Development AS license units are installed on the AS license database. These licenses can neither be installed nor uninstalled using the license administration utility, although they appear in the License List (which you can display by selecting option 1 from the license administration utility menu), marked as Developer Usage. The majority of systems do not have a Micro Focus Development system installed, so Developer Usage entries are not usually displayed.

3.2 Viewing Current Users

From the AppTrack License Administration utility you can view a list of users who currently have ASLMF license units in use by selecting option 7 (Current Users). Alternatively, you can redirect output to a file by running the free-standing utility /var/mfaslmf/userstat.gnt and using standard redirection.

To use this option you must first enable logging by creating an empty file apptrack.log in /var/mfaslmf. The simplest way to do this is by using the touch command:

 touch /var/mfaslmf/apptrack.log

You must give the file general write permissions, otherwise the current users display might be incorrect.

The display is made up of blocks of information, one block for each ASLMF $COBDIR that is active. Each block begins with a display of a $COBDIR value and is followed by a list of records, one record for each user job under that $COBDIR. The details on each record are

Date and time
Process Id (PID)
User Id (UID)
tty Name
$COBDIR
Total number of licenses available
Number of licenses currently in use

3.3 Statistics Collection

It can be useful, for statistical purposes, to take a snapshot of license use at regular intervals over a period of time and get an average number of license uses at the end of the data collection. To do this, use the command:

$COBDIR/aslmf/apptrack stats p n

where the parameters are:

p The period, in seconds, between each statistics collection
n The number of statistics collections to make

For example, the command:

$COBDIR/aslmf/apptrack stats 60 10

takes 10 snapshots, with 60 seconds between each.

By default, the statistics are displayed on the screen. It is usually more useful to direct them into a file; for example:

$COBDIR/aslmf/apptrack stats 60 10 >> userfile

The format of the statistics is similar to that displayed by the AppTrack license summary; see the section Monitoring License Use for details. The differences are that the heading lines are not displayed, and that each snapshot is separated by a dividing line.

Disabled licenses also appear in the statistics.

3.4 Special Action On No-license Condition

If you have more users trying to run your application than you have licenses installed, there will be times when some users will receive the response that there are no more license units available at that moment. You can monitor how often this happens, so that you can determine how many additional AS licenses you need to purchase.

To help you monitor no-license conditions, AppTrack runs the shell script /var/mfaslmf/nolicense every time that it is unable to satisfy a license unit request. A single parameter is passed to the script; this parameter identifies the directory of the installed Application Server, so that different applications can be separately identified. The script then writes the name of the directory, and the date and time at which the attempt to run failed, to the file /var/mfaslmf/USERLOG.

You can edit the nolicense script to your requirements. For example, the script contains a line that is commented out, that demonstrates how each time the script is invoked, a message could be mailed to a specified user.

If you do not want to use this monitoring facility, you can remove the nolicense script. To do this you can either delete or rename nolicense; renaming it is safest, as you can then easily recreate the file if you require it later.

AppTrack executes the nolicense script only if it is owned by root, and has no write permissions for Group or Other. This is to prevent anyone other than the person who is responsible for license administration from editing the script.

3.5 Automatic License Retry

Instantaneous demands for an application by users might occasionally cause your license quota to be exceeded, although you have sufficient licenses overall. If this occurs you are advised to set the environment variable ASLMFRETRY.


Note: You can check how many users are using a license over a period of time using the stats command. See the section Statistics Collection for details.


ASLMFRETRY enables you to set a value that specifies the number of times an application should attempt to get a license unit, and the length of time it should wait between attempts. In effect, the task suspends itself until a license unit becomes free.

The format of ASLMFRETRY is:

ASLMFRETRY=retries[,wait]

where the parameters are:

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

For example, to enable 100 attempts to use a license:

ASLMFRETRY=100
export ASLMFRETRY 

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

ASLMFRETRY=25,60
export ASLMFRETRY 

Note: If you set the ASLMFRETRY environment variable, no retry is attempted unless all unused overdraft license units (if available) have been used. See the section Overdraft for details of the overdraft facility.


3.6 Overdraft

If you intend to run more than one copy of your application at the same time, you must ensure that you have sufficient license units to cover the number of concurrent users. During an exceptional period, for example, at year end, you might need to run more concurrent copies of your application than usual. You need to order sufficient AS licenses to cover this situation. However, to help you cope with unexpected fluctuations in use, and to give you time to purchase additional licenses, AppTrack has a built-in limited overdraft facility. The first time that an attempt is made to run more concurrent copies of an application than there are applicable license units, the overdraft facility is started. This enables you to run additional copies of the application for a period of 30 days. After this time, the licensing reverts to standard use.

If you have set the ASLMFRETRY environment variable, as described in the section Automatic License Retry, no retry is attempted until all unused overdraft license units (if available) have been used.

The number of additional overdraft copies that you can run depends on the number of license units installed for the application:

License units
installed
Overdraft license
units available
1 0
2 - 9 1
10 - 19 2
20 - 29 3
30 - 39 4

For each further ten license units installed, an additional overdraft license becomes available.

3.7 License Usage Warning

If you would find it useful to receive advance warning of the need to purchase additional licenses, and to have some control over when the overdraft is first used, you can arrange to have a user script launched whenever the ASLMF license usage reaches or exceeds a level defined by you.

By default, license usage warning is not enabled.

You specify the license usage level in the text file watermark, which you must create in the $COBDIR directory in which Application Server is installed. License usage warning works per installation of Application Server, so you can turn it on or off for each installation, and use different usage levels for each installation.

The text file watermark contains the license usage level defined in one of the following ways:

When the license usage level is met or exceeded, Apptrack executes the user script /var/mfaslmf/watermark, passing it the following parameters.

You must write the user script /var/mfaslmf/watermark, to take whatever action you would find useful, for example the script could send a warning to you by e-mail.

Apptrack executes the watermark script only if it is owned by root, and has no write permissions for Group or Other. This is to prevent anyone other than the person who is responsible for license administration from editing the script.

License usage warning is in effect only if the text file $COBDIR /watermark is present. If you want to disable license usage warning, you should remove or rename the file watermark, and not simply change the license usage level value to an unattainable value. This is because if the file exists, AppTrack opens it and parses its contents. This is a waste of processing effort and time.

3.8 Troubleshooting

If users cannot run an application even though AS licenses are installed, check that the licenses were installed for the correct Application Server. Start the license administration utility, and select option 1 (License List).

If the licenses are listed correctly, check that the setting you are using for the Application Server directory matches the correct application.

If you have installed to the wrong Application Server, uninstall the licenses, set COBDIR to the correct directory, and reinstall the licenses to the Application Server.

If you are installed to the correct directory, but you still cannot run the application, try selecting option 6 (Reinitialize Licensing) of the license administration utility. If this fails to work, you should contact your application supplier and explain the problem.

If you receive the message "Environment variable COBDIR not set" when you start an application under AppTrack, check that:


Copyright © 2002 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.


PreviousInstalling AS Licenses Development System UsersNext