How to determine if license is concurrent?

16 visualizzazioni (ultimi 30 giorni)
Jeremy Johnson
Jeremy Johnson il 8 Nov 2011
Is there a way to programmatically determine if a specific feature is using a local or a concurrent license?
  2 Commenti
Jeremy Johnson
Jeremy Johnson il 9 Nov 2011
I have a function that I need to behave differently if it will be running with a concurrent license rather than a local license.
While I agree that unplugging the network cable would work, I don't think I can do that from within a function :)
I guess that parsing the license file could work, but I agree that getting the parsing to be fool proof would be difficult.
Walter Roberson
Walter Roberson il 10 Nov 2011
We have sort of run in to something like this, in that for our concurrent toolbox, we would like to use it for a short time and then give it back (it allows us to give more detailed information that is nice but not necessary.) However, it turns out that the only way to release a toolbox is to exit MATLAB :(

Accedi per commentare.

Risposte (4)

Thomas
Thomas il 10 Nov 2011
A concurrent network license allows users to run MATLAB concurrently (one user at a time per license key) on any computer. This license can consist of 1 or more keys of MATLAB and any number of additional toolboxes or other products.
You can check the network.lic file int he MATLAB installation directory By default, the license file location is $MATLAB\licenses for all platforms. The license file name will be network.lic
On Mac's this file is located in /Applications/MATLAB_R2011b.app/licenses/network.lic
On Linux systems it is usually located at /usr/local/matlabR2011b/licenses/network.lic (conditional to the install location being /usr/local)
Open the network.lic file
SERVER lmgr@*.* Port#
USE_SERVER
This shows a concurrent network license and the license is checked out from the flex lm license manager located on the server "lmgr@*.*" at port "Port#"
Or as Sam suggested unplug the network cable and initialize MATLAB.. If it starts up you have a designated computer license.

Daniel Shub
Daniel Shub il 9 Nov 2011
I don't know if there is a built-in programmatic way. The license command doesn't seem to provide that information. I don't have access to a concurrent license anymore, but I believe there are differences in the structure of the license file. You could read that file in and parse it to see.

Andreas Goser
Andreas Goser il 9 Nov 2011
The information can indeed be found in the local license file. There is however, a wide field how license files may look like and there are a couple of IF/THEN operations needed to make it fool-proof.
In essence, the question is what is your underlying goal and then the help can be more specific.
  2 Commenti
Andreas Goser
Andreas Goser il 10 Nov 2011
Thanks for describing a bit of the reason. I am still not at the bottom of this. Do you have a certain toolbox product that it not available in one license type? Then I can think of other, better ways of addressing this. But what other reason can exist for using a different algorithm by license type?
Daniel Shub
Daniel Shub il 10 Nov 2011
In the past, it appeared that MATLAB ran the license verification process in the same thread as computations. This meant that if the license server was flaky, your computation could hang for a bit while MATLAB tried to verify the license. I am not sure if this is the case anymore.
A differential use case is that if I have a local license I can run an analysis at the same time as I collect "realtime" data from a DAC or serial port. If the analysis requires a toolbox with a network license, then I might want to wait for the data collection to end before starting the analysis.

Accedi per commentare.


sco1
sco1 il 9 Nov 2011
Other than looking at the license file itself, a dead simple way is to unplug your network connection and see if it still works!

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by