MGLS_LICENSE_FILE

OS: Linux, Windows

MGLS_LICENSE_FILE is a Mentor-specific client environment variable and is the first environment variable Mentor applications check to determine the license file or server location.

We encourage you to use MGLS_LICENSE_FILE for optimum performance of Mentor applications. Using MGLS_LICENSE_FILE to point to licenses for your Mentor tools speeds the license check-out process and other licensing-related activity.

CAUTION:

Make sure you specify the server information correctly; pointing to a nonexistent server or unresolvable host name negatively impacts performance.

If you have multiple products from different vendors that use FlexNet Licensing, using both the MGLS_LICENSE_FILE and LM_LICENSE_FILE environment variables enable Mentor-licensed products to obtain their licenses from MGLS_LICENSE_FILE and products from other vendors to obtain their licenses from LM_LICENSE_FILE.

Note:

Standard FlexNet Licensing commands such as lmutil, lmstat, and lmreread do not recognize the MGLS_LICENSE_FILE variable, so use the -c switch with those commands to explicitly point to the license location. For example:

lmutil lmstat -a -c port@host:path_to_license_file

The description in this section also pertains to the LM_LICENSE_FILE environment variable, so you can substitute “LM_LICENSE_FILE” wherever you see “MGLS_LICENSE_FILE.”

MGLS_LICENSE_FILE Syntax

On Linux, use a colon (:) to separate independent license sources. For example:

license_file_pathname1:license_file_pathnameN:port@host1:port@hostN

On Windows, use a semicolon (;) to separate independent license sources. For example:

license_file_pathname1;license_file_pathnameN;port@host1;port@hostN

When you define multiple servers, the application utilizes the license servers in the order they appear in the license file variable. For example, if you set your environment variable to

license_server1:license_server2

the application requests a license from license_server1 and, if that license is in use or not available, the application requests the license from license_server2.

MGLS_LICENSE_FILE Length

The total length of the MGLS_LICENSE_FILE is dynamic and depends on the environment. In particular, the number of available file descriptors affects the number of license server or file entries. The basic licensing technology, FlexNet, limits each port@host entry to 1024 characters and a license path entry to 4096 characters. Your environment may have additional constraints.

Method to Reference a License Server

You can reference a license server by using the port@host syntax. This method enables you to contact a license server without needing to know the pathname to the license file that the license server is using.

The following example references an independent server.

MGLS_LICENSE_FILE=1717@host

The following example indicates the path to a group of redundant servers.

MGLS_LICENSE_FILE=1717@host1,1717@host2,1717@host3

Method to Reference a License File (Mobile Compute)

To reference a license file, use the pathname to the license file.

The following example indicates the pathname to the license file.

MGLS_LICENSE_FILE=C:\MentorGraphics\License_Files\license.dat

Method to Reference Multiple Server Configurations

To point to multiple server configurations, combine any of the syntax in a colon-separated list for Linux or a semicolon-separated list for Windows.

The following example points to multiple server configurations.

Linux:

MGLS_LICENSE_FILE=1717@independent:1717@redundant1,1717@redundant2,
   1717@redundant3

Windows:

MGLS_LICENSE_FILE=1717@independent;1717@redundant1,1717@redundant2,
   1717@redundant3