How to determine if license is concurrent?

17 ビュー (過去 30 日間)
Jeremy Johnson
Jeremy Johnson 2011 年 11 月 8 日
Is there a way to programmatically determine if a specific feature is using a local or a concurrent license?
  2 件のコメント
Jeremy Johnson
Jeremy Johnson 2011 年 11 月 9 日
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 2011 年 11 月 10 日
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 :(

サインインしてコメントする。

回答 (4 件)

Thomas
Thomas 2011 年 11 月 10 日
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 2011 年 11 月 9 日
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 2011 年 11 月 9 日
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 件のコメント
Andreas Goser
Andreas Goser 2011 年 11 月 10 日
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 2011 年 11 月 10 日
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.

サインインしてコメントする。


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

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by