Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Services & Resources / Archive
-----
 /
Network Mathematica
*Mathematica
*Network Mathematica
*webMathematica
*gridMathematica
*Personal Grid Edition
*Wolfram Workbench
*Wolfram Education Group
*Application Packages
*Mathematica for Students
*Mathematica CalcCenter
*Publicon
*A New Kind of Science Explorer
*Mathematical Explorer
*Mathematica Teacher's Edition
*Calculus WIZ
*Mathematica Player
*Ask about this page
*Print this page
*Email this page
*Give us feedback
*
Sign up for our newsletter:

MathLM Restict Script Tutorial

1. What is a restriction program?

A restriction program is a program that MathLM (Mathematica License Manager) calls every time there is a request from a Mathematica client to checkout a license.

The restrict program then either accepts or denies the license request. The criteria used to make this decision can be based on two types of information.

1.

Information passed to the restrict program from MathLM

2.

Information available from the system (time/date, etc)

2. What languages are supported?

You can write a restrict program in any language that can accept strings and return an integer. The two most common languages that restrict programs are written in are C and Perl. This tutorial will deal with and provide examples in these two languages.

3. What information does the restrict program receive from MathLM?

MathLM always passes 2N+1 strings to the restrict program. The first string is a requst line string, and the other 2N strings show the status of the license slots. In this case, N is the number of network licenses allowed on your network.

The first parameter is the current request and always takes the format of

"user_name,machine_name"

The user_name and machine_name are both of the requesting user and client.

The other 2N parameters can vary in two ways - unlimited and limited networks. In both cases, however, they represent the license status of MathLM prior to the request.

First, if the password is a Network Unlimited, there will always be two lines, first the Kernel Status and the Front End status. The following parameters show the status of a network unlimited license at the time of the first license request, be it for a Front End or Kernel.

"1,0, 2,0,"

As you can see, both lines are "NUM, 0,". NUM represents which client number is being referred to. In a situation where there is no limit to the clients, there is only one listed Front End and one listed Kernel. The second paramter, 0, says that no machine has taken this slot.

The following examples will show what is passed to the restrict program after a Front End, and then a Kernel is launched in a network unlimited environment.

Upon first launching the front end, MathLM passes the user_name, machine_name, and status to the restrict program. As you can see, the current status of MathLM prior to the first launch is that nothing is launched, there is only a request.

 

user_name,machine_name 1,0, 2,0,

After launching the Front End, a Kernel is launched. Here the status is different. As you can see, the current status of MathLM prior to the Kernel launch is that only the Front End has been launched.

 

user_name,machine_name 1,0, 2,user_name,machine_name

If you decide to launch a second Front End or Kernel, you will see that both slots are already taken. Since this is a network unlimited license, MathLM still allows you to run Mathematica.

 

user_name,machine_name 1,user_name,machine_name 2,user_name,machine_name

The second, most common, and most useful situation is a network with a limited number of clients. The difference here is that there is a status line for every Front End and Kernel on the network. The following example will show the parameters passed to the restrict program in a network with five front end licenses and five kernel licenses.

When the first Front End is being launched, the current status of MathLM before it accepts or denies this request shows that so far, nothing is launched. There is only a request. As you can see, there are ten licenses available, five front end and five kernel.

 

user_name,machine_name 1,0, 2,0, 3,0, 4,0, 5,0, 6,0, 7,0, 8,0, 9,0, 10,0,

Upon launching the first Kernel (after the first front end) the status shows a Kernel request and slot taken by one Front End.

 

user_name,machine_name 1,0, 2,0, 3,0, 4,0, 5,0, 6,user_name,machine_name 7,0, 8,0, 9,0, 10,0,

The launching of a second Kernel or Front End will show slots taken by one Kernel and one Front End with another request.

 

user_name,machine_name 1,user_name,machine_name 2,0, 3,0, 4,0, 5,0, 6,user_name,machine_name 7,0, 8,0, 9,0, 10,0,

4. Limitations of MathLM restriction programs.

Inability to differentiate a Front End request from a Kernel request.

 

You will notice that the request lines for Front Ends and Kernels are identical. They take the form of user_name,machine_name. This is a current limitation of the restiction functionality in MathLM. It does not pass any information that would allow a script to distinguish a Front End from a Kernel request. On the license table, all Kernel slots come first and are then followed by Front End slots. That is why the Front End first took slot six and the Kernel took slot one.

Inability to determine user_name from a Windows client.

 

If you are running Mathematica from a Windows machine, user_name is always displayed as 65535.

Inability to resolve Fully Qualified Domain Names (FQDN).

 

Because the Mathematica Front End and Kernel do not resolve the fully qualified domain name of the machine, and instead only pass the machine name to the restrict script, is is not possible to restrict by domains. A possible, but not foolproof workaround would be to restrict by a list of machines, where the list would be all the machines in your domain.

Solutions to all of the above limitations are being worked on and will be announced upon the release of the next version of MathLM. If you need further assistance, please contact Technical Support.

Download this FAQ as a Mathematica 5.2 Notebook






 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy