White dot for spacing only
The Dice Project


Matlab Licence Servers

matlab.html,v 1.11 2010/07/20 09:56:06 gdutton Exp

Software Use

Matlab is used for teaching and research by a number of groups in Informatics and outside it. They use a number of different Matlab installations on different architectures. There are two sets of licences, one strictly for teaching and the other for research.

One of the more notable users of the research licences is a scanning service at the Western General hospital! For (at least) this reason we have to get the licences back up quickly if something goes wrong.

FlexLM Licence Manager

Both our matlab servers now use the common lcfg-flexlm component to manage all aspects of its service. See the flexlm documentation for more information.

The Licences

There is one research licence server located on 'bakerloo' VM:

  elephant.inf.ed.ac.uk	AKA	matlab-research.inf.ed.ac.uk

There is one teaching licence server located on 'central' VM:

  ruislip.inf.ed.ac.uk	AKA	matlab-teaching.inf.ed.ac.uk

Packages

We currently serve Matlab 7.5 / 7.7 licences. The main application is held in the matlab package. Purchased toolboxes are held in supplementary packages (matlab-wavelettoolbox, matlab-statstoolbox, matlab-optimtoolbox, matlab-signaltoolbox, matlab-nnettoolbox, matlab-imagestoolbox) although still generated from the matlab package source RPM). Clients have all the packages above installed in addition to the matlab-license package (this provides a suitable defenv environment configuring matlab to use the right license server). The licence servers only need the lcfg-flexm component and either the matlab-license-research package or the matlab-license-teaching package

Configuration

Additional LCFG configuration is required to run a licence server. For a server running FlexLM for Research licenses add:

  #include <dice/options/matlab-research-server.h>

or for a server running FlexLM for Teaching licenses add:

  #include <dice/options/matlab-teaching-server.h>

All the necessary configuration and packages are included in the options header file. Look at these for further information, although basically, they add the necessary packages above and configure the the license file.

Stopping and Starting

See the flexlm documentation for full details. In summary, one can start and stop the servers using the flexlm component.

Usage monitor

See the flexlm documentation for full details. The matlab usage monitoring pages are available at:

Where to get Matlab

We get Matlab sofware and support from http://www.mathworks.com.

To download software or to do other privileged things at this site you have to login to it. You are asked to do this when you attempt a privileged operation such as going to the "download software" page. This account is in Tim's name.

You can also use the above account to request a new licence file if you need to change one of the licence servers for example. The licence file is based on machine hardware address, as defined in dhclient.mac or by doing /sbin/ifconfig eth0 removing the colons and making sure every single digit has a leading zero.

The licences appear to be valid indefinitely - at least, they expire on "31 jan 0000" - however the maintenance agreement must be renewed annually.

Disaster Recovery Procedure

Any machine can be configured to stand-in as the Matlab license server by following the following procedure. First include either the dice/options/matlab-research-server.h or dice/options/matlab-teaching-server.h header in the profile of the stand-in machine. Once the profile for the stand-in machine has compiled reboot it. Note that at this stage it will fail to start up the server because the MAC will be incompatible with the license.

Now manually hack the MAC on the stand-in machine to match the license as below. First get the MAC the license needs by looking at the SERVER line in either /usr/lib/lcfg/conf/matlab/research or /usr/lib/lcfg/conf/matlab/teaching as appropriate. An example of doing this with previous servers is shown below.

[timc@gambet ~]$ awk '/SERVER/{print$3}' /usr/lib/lcfg/conf/matlab/research
0002b3d4f8e2
[timc@sonsie ~]$ awk '/SERVER/{print$3}' /usr/lib/lcfg/conf/matlab/teaching
0004236092EA
Now reset the MAC on the stand-in machine as root by using the appropriate MAC found above with colons between every two digits. So for the current research server you would do:
ifconfig eth0 down hw ether 00:02:b3:d4:f8:e2
and for the current teaching server you would do:
ifconfig eth0 down hw ether 00:04:23:60:92:EA
Then restart the network:
ifconfig eth0 up
You can check the address has changed and the network restarted by doing:
/sbin/ifconfig eth0
Note that any MAC changes will revert after reboot and you will need to manually re-apply them if the stand-in server is rebooted or restarts. Now start the license server:
om flexlm restart
Check the LCFG and vendor daemon log files for successful start up as described above.

To check your new server on a random client, first set the environment variable to point at the stand-in server and then start matlab.

export MLM_LICENSE_FILE=27100@stand-in-host.inf.ed.ac.uk
matlab

Clients are configured to talk to either matlab-research@inf.ed.ac.uk or matlab-teaching@inf.ed.ac.uk. So you should rfe dns/inf and change the appropriate DNS CNAME entry so that it points at the stand-in server instead. Note that this change can take half an hour or so to propogate to all the clients.


 : Units : Research_and_teaching : Documentation 

Mini Informatics Logo - Link to Main Informatics Page
Please contact us with any comments or corrections.
Unless explicitly stated otherwise, all material is copyright The University of Edinburgh
Spacing Line