Hoffman2:Scripts:matlab license check.sh: Difference between revisions

From Center for Cognitive Neuroscience
Jump to navigation Jump to search
(Created page with "Back to Hoffman2 Scripts ==Use Cases== * You need to run a MATLAB script and want to check that there are sufficient licenses. If not, you are grabbing a c...")
 
No edit summary
Line 4: Line 4:
* You need to run a MATLAB script and want to check that there are sufficient licenses.  If not, you are grabbing a coffee or going for a run until they free up.
* You need to run a MATLAB script and want to check that there are sufficient licenses.  If not, you are grabbing a coffee or going for a run until they free up.
* You tried running a MATLAB script and found that you couldn't check out sufficient licenses to do your work.  Now you want to see if the users taking up precious licenses are part of your group so you can ask/yell for them to release the license and step away from the computer for a bit.
* You tried running a MATLAB script and found that you couldn't check out sufficient licenses to do your work.  Now you want to see if the users taking up precious licenses are part of your group so you can ask/yell for them to release the license and step away from the computer for a bit.
==A bit about licenses==
Every time you run the MATLAB program, you need a MATLAB license.  If you also make use of the utilities in a specific toolbox, say some statistical plotting commands line <code>boxplot</code> from the Statistics Toolbox, you need a license for that specific toolbox in addition to the one just for MATLAB.
If you were trying to run multiple MATLAB instances at once and each used a specific toolbox, you can see how the number of licenses you'd need could get out of hand.
[[Hoffman2:Compiling_MATLAB|Compiled MATLAB]] only needs the requisite licenses to create the compiled code.  After that it can run without taking up a license making compiled code very attractive for massively parallel processing.





Revision as of 00:52, 18 June 2013

Back to Hoffman2 Scripts

Use Cases

  • You need to run a MATLAB script and want to check that there are sufficient licenses. If not, you are grabbing a coffee or going for a run until they free up.
  • You tried running a MATLAB script and found that you couldn't check out sufficient licenses to do your work. Now you want to see if the users taking up precious licenses are part of your group so you can ask/yell for them to release the license and step away from the computer for a bit.



A bit about licenses

Every time you run the MATLAB program, you need a MATLAB license. If you also make use of the utilities in a specific toolbox, say some statistical plotting commands line boxplot from the Statistics Toolbox, you need a license for that specific toolbox in addition to the one just for MATLAB.

If you were trying to run multiple MATLAB instances at once and each used a specific toolbox, you can see how the number of licenses you'd need could get out of hand.

Compiled MATLAB only needs the requisite licenses to create the compiled code. After that it can run without taking up a license making compiled code very attractive for massively parallel processing.


Help/Usage

    matlab_license_check.sh
    2013.06.17

    Wrapper script for the command
        /u/local/licenses/lic_manager.sh users matlab
    which is used to check on the status of MATLAB licenses on Hoffman2. The
    output is slightly modified and managed to make it more readable for users.


    USAGE:
      $ matlab_license_check.sh [-h --help -r -f]


    ARGUMENTS:
      With no argument, a simple digest version is displayed listing the
      number of used and avaiable licenses of each MATLAB tool.

      Optional arguments:
        -h, --help  Show this usage message
        -r          Show the digest version plus reservation information,
                    because reserved licenses are counted as in-use, so even if
                    it says all licenses are used, it is important to check to
                    see if there are any reserved licenses that you are able to
                    make use of.
        -f          Show the full output, including details about which users
                    are using licenses and on which nodes


Example Output

Digest

$ matlab_license_check.sh
20130409T144846-0700
MATLAB
---- (Total of 37 licenses issued;  Total of 37 licenses in use)
Compiler
---- (Total of 7 licenses issued;  Total of 4 licenses in use)
Curve_Fitting_Toolbox
---- (Total of 1 license issued;  Total of 1 license in use)
Image_Toolbox
---- (Total of 8 licenses issued;  Total of 8 licenses in use)
Optimization_Toolbox
---- (Total of 4 licenses issued;  Total of 2 licenses in use)
Signal_Toolbox
---- (Total of 5 licenses issued;  Total of 4 licenses in use)
Statistics_Toolbox
---- (Total of 15 licenses issued;  Total of 11 licenses in use)
Wavelet_Toolbox
---- (Total of 2 licenses issued;  Total of 2 licenses in use)
Bioinformatics_Toolbox
---- (Total of 8 licenses issued;  Total of 8 licenses in use)
Distrib_Computing_Toolbox
---- (Total of 3 licenses issued;  Total of 1 license in use)
MATLAB_Distrib_Comp_Engine
---- (Total of 16 licenses issued;  Total of 0 licenses in use)
SIMULINK
---- (Total of 2 licenses issued;  Total of 0 licenses in use)
Control_Toolbox
---- (Total of 2 licenses issued;  Total of 0 licenses in use)
Simulink_Control_Design
---- (Total of 2 licenses issued;  Total of 0 licenses in use)
Simulink_Design_Optim
---- (Total of 2 licenses issued;  Total of 0 licenses in use)
Symbolic_Toolbox
---- (Total of 1 license issued;  Total of 0 licenses in use)

This shows that all MATLAB licenses are either in use or reserved, so it is unclear if I have one available to checkout. It also shows that things like SIMULINK and Symbolic Toolbox are not in use by anyone right now but things like the Wavelet and Bioinformatics Toolboxes are in use or reserved.


Reservations

$ matlab_license_check.sh -r
20130409T144846-0700
MATLAB
---- (Total of 37 licenses issued;  Total of 37 licenses in use)
-------- 1 RESERVATION for GROUP bueragroup (lm/27010)
-------- 5 RESERVATIONs for GROUP cohenlab (lm/27010)
-------- 5 RESERVATIONs for GROUP fmrigroup (lm/27010)
-------- 4 RESERVATIONs for GROUP galaxygroup (lm/27010)
-------- 1 RESERVATION for GROUP ghoniemgroup (lm/27010)
-------- 3 RESERVATIONs for GROUP kluggroup (lm/27010)
-------- 1 RESERVATION for GROUP miaogroup (lm/27010)
-------- 1 RESERVATION for GROUP miaogroup (lm/27010)
-------- 1 RESERVATION for GROUP moshegroup (lm/27010)
-------- 1 RESERVATION for GROUP moshegroup (lm/27010)
-------- 1 RESERVATION for GROUP moshegroup (lm/27010)
-------- 1 RESERVATION for GROUP staff1group (lm/27010)
-------- 1 RESERVATION for GROUP staff1group (lm/27010)
Compiler
---- (Total of 7 licenses issued;  Total of 4 licenses in use)
-------- 1 RESERVATION for GROUP cohenlab (lm/27010)
-------- 2 RESERVATIONs for GROUP miaogroup (lm/27010)
-------- 1 RESERVATION for GROUP staff1group (lm/27010)
Curve_Fitting_Toolbox
---- (Total of 1 license issued;  Total of 1 license in use)
-------- 1 RESERVATION for GROUP bueragroup (lm/27010)
Image_Toolbox
---- (Total of 8 licenses issued;  Total of 8 licenses in use)
-------- 5 RESERVATIONs for GROUP cohenlab (lm/27010)
-------- 2 RESERVATIONs for GROUP fmrigroup (lm/27010)
Optimization_Toolbox
---- (Total of 4 licenses issued;  Total of 2 licenses in use)
-------- 2 RESERVATIONs for GROUP fmrigroup (lm/27010)
Signal_Toolbox
---- (Total of 5 licenses issued;  Total of 4 licenses in use)
-------- 1 RESERVATION for GROUP cohenlab (lm/27010)
-------- 2 RESERVATIONs for GROUP fmrigroup (lm/27010)
Statistics_Toolbox
---- (Total of 15 licenses issued;  Total of 11 licenses in use)
-------- 3 RESERVATIONs for GROUP fmrigroup (lm/27010)
-------- 4 RESERVATIONs for GROUP galaxygroup (lm/27010)
-------- 4 RESERVATIONs for GROUP pellegrinigroup (lm/27010)
Wavelet_Toolbox
---- (Total of 2 licenses issued;  Total of 2 licenses in use)
-------- 1 RESERVATION for GROUP cohenlab (lm/27010)
-------- 1 RESERVATION for GROUP fmrigroup (lm/27010)
Bioinformatics_Toolbox
---- (Total of 8 licenses issued;  Total of 8 licenses in use)
-------- 4 RESERVATIONs for GROUP galaxygroup (lm/27010)
-------- 4 RESERVATIONs for GROUP pellegrinigroup (lm/27010)
Distrib_Computing_Toolbox
---- (Total of 3 licenses issued;  Total of 1 license in use)
MATLAB_Distrib_Comp_Engine
---- (Total of 16 licenses issued;  Total of 0 licenses in use)
SIMULINK
---- (Total of 2 licenses issued;  Total of 0 licenses in use)
Control_Toolbox
---- (Total of 2 licenses issued;  Total of 0 licenses in use)
Simulink_Control_Design
---- (Total of 2 licenses issued;  Total of 0 licenses in use)
Simulink_Design_Optim
---- (Total of 2 licenses issued;  Total of 0 licenses in use)
Symbolic_Toolbox
---- (Total of 1 license issued;  Total of 0 licenses in use)

This shows that there are still five (5) licenses reserved for cohenlab (mscohen) and fmrigroup (sbook), despite all other licenses being used. The Wavelet and Bioinformatics Toolboxes are all in use because they are all reserved by specific groups, but SIMULINK and the Symbolic Toolbox are not used and don't have any reservations on them.


Full

$ matlab_license_check.sh -f
20130409T144846-0700

    You have requested: users matlab

Arguments are "users" and "matlab"
The license directory is /u/local/licenses
The apps directory is /u/local/apps
 
lmstat - Copyright (c) 1989-2010 Flexera Software, Inc. All Rights Reserved.
Flexible License Manager status on Tue 4/9/2013 14:48

License server status: 27010@lm
    License file(s) on lm: /u/local/licenses/license.matlab:

        lm: license server UP (MASTER) v11.9

Vendor daemon status (on lm):

       MLM: UP v11.6
Feature usage info:

Users of MATLAB:  (Total of 37 licenses issued;  Total of 37 licenses in use)

  "MATLAB" v27, vendor: MLM
  floating license

    alhead n2173 /dev/tty (v27) (lm/27010 1805), start Tue 4/9 13:33

  "MATLAB" v27, vendor: MLM
  floating license

    alnersh n47 /dev/tty (v27) (lm/27010 1208), start Tue 4/9 11:43

  "MATLAB" v28, vendor: MLM
  floating license


  "MATLAB" v28, vendor: MLM
  floating license

    1 RESERVATION for GROUP bueragroup (lm/27010)

  "MATLAB" v27, vendor: MLM
  floating license

    5 RESERVATIONs for GROUP cohenlab (lm/27010)

  "MATLAB" v28, vendor: MLM
  floating license

    5 RESERVATIONs for GROUP fmrigroup (lm/27010)

  "MATLAB" v27, vendor: MLM
  floating license

    4 RESERVATIONs for GROUP galaxygroup (lm/27010)

  "MATLAB" v28, vendor: MLM
  floating license

    1 RESERVATION for GROUP ghoniemgroup (lm/27010)
    hstroudd n2004 /dev/tty (v27) (lm/27010 301), start Tue 4/9 8:12
    hstroudd n39 /dev/tty (v27) (lm/27010 401), start Tue 4/9 8:13
    hstroudd n2002 /dev/tty (v27) (lm/27010 501), start Tue 4/9 8:14
    hstroudd n45 /dev/tty (v27) (lm/27010 601), start Tue 4/9 8:14

  "MATLAB" v27, vendor: MLM
  floating license

    huangzhi n126 /dev/pts/0 (v20) (lm/27010 902), start Tue 4/9 10:03
    huning n2176 /dev/tty (v27) (lm/27010 802), start Tue 4/9 10:01

  "MATLAB" v27, vendor: MLM
  floating license


  "MATLAB" v21, vendor: MLM
  nodelocked license, locked to "ID=301818"

    3 RESERVATIONs for GROUP kluggroup (lm/27010)

  "MATLAB" v21, vendor: MLM
  nodelocked license, locked to "ID=319868"

    1 RESERVATION for GROUP miaogroup (lm/27010)

  "MATLAB" v27, vendor: MLM
  floating license

    1 RESERVATION for GROUP miaogroup (lm/27010)

  "MATLAB" v27, vendor: MLM
  floating license

    1 RESERVATION for GROUP moshegroup (lm/27010)

  "MATLAB" v27, vendor: MLM
  floating license

    1 RESERVATION for GROUP moshegroup (lm/27010)
    1 RESERVATION for GROUP moshegroup (lm/27010)
    navari n2177 /dev/tty (v27) (lm/27010 201), start Tue 4/9 8:11

  "MATLAB" v27, vendor: MLM
  floating license


  "MATLAB" v27, vendor: MLM
  floating license

    1 RESERVATION for GROUP staff1group (lm/27010)

  "MATLAB" v21, vendor: MLM
  nodelocked license, locked to "ID=301818"

    1 RESERVATION for GROUP staff1group (lm/27010)
    wuli n43 /dev/tty (v20) (lm/27010 703), start Tue 4/9 8:30

  "MATLAB" v27, vendor: MLM
  floating license

    xiahongj n40 /dev/tty (v27) (lm/27010 101), start Tue 4/9 8:11

Users of Compiler:  (Total of 7 licenses issued;  Total of 4 licenses in use)

  "Compiler" v28, vendor: MLM
  floating license


  "Compiler" v21, vendor: MLM
  nodelocked license, locked to "ID=301818"

    1 RESERVATION for GROUP cohenlab (lm/27010)

  "Compiler" v27, vendor: MLM
  floating license

    2 RESERVATIONs for GROUP miaogroup (lm/27010)
    1 RESERVATION for GROUP staff1group (lm/27010)

Users of Curve_Fitting_Toolbox:  (Total of 1 license issued;  Total of 1 license in use)

  "Curve_Fitting_Toolbox" v28, vendor: MLM
  floating license

    1 RESERVATION for GROUP bueragroup (lm/27010)

Users of Image_Toolbox:  (Total of 8 licenses issued;  Total of 8 licenses in use)

  "Image_Toolbox" v28, vendor: MLM
  floating license


  "Image_Toolbox" v27, vendor: MLM
  floating license

    5 RESERVATIONs for GROUP cohenlab (lm/27010)

  "Image_Toolbox" v27, vendor: MLM
  floating license

    2 RESERVATIONs for GROUP fmrigroup (lm/27010)
    huangzhi n126 /dev/pts/0 (v20) (lm/27010 1001), start Tue 4/9 10:12

Users of Optimization_Toolbox:  (Total of 4 licenses issued;  Total of 2 licenses in use)

  "Optimization_Toolbox" v27, vendor: MLM
  floating license

    2 RESERVATIONs for GROUP fmrigroup (lm/27010)

Users of Signal_Toolbox:  (Total of 5 licenses issued;  Total of 4 licenses in use)

  "Signal_Toolbox" v27, vendor: MLM
  floating license

    alnersh n47 /dev/tty (v27) (lm/27010 1103), start Tue 4/9 12:11

  "Signal_Toolbox" v28, vendor: MLM
  floating license


  "Signal_Toolbox" v27, vendor: MLM
  floating license

    1 RESERVATION for GROUP cohenlab (lm/27010)
    2 RESERVATIONs for GROUP fmrigroup (lm/27010)

Users of Statistics_Toolbox:  (Total of 15 licenses issued;  Total of 11 licenses in use)

  "Statistics_Toolbox" v27, vendor: MLM
  floating license


  "Statistics_Toolbox" v28, vendor: MLM
  floating license

    3 RESERVATIONs for GROUP fmrigroup (lm/27010)
    4 RESERVATIONs for GROUP galaxygroup (lm/27010)
    4 RESERVATIONs for GROUP pellegrinigroup (lm/27010)

Users of Wavelet_Toolbox:  (Total of 2 licenses issued;  Total of 2 licenses in use)

  "Wavelet_Toolbox" v28, vendor: MLM
  floating license


  "Wavelet_Toolbox" v27, vendor: MLM
  floating license

    1 RESERVATION for GROUP cohenlab (lm/27010)
    1 RESERVATION for GROUP fmrigroup (lm/27010)

Users of Bioinformatics_Toolbox:  (Total of 8 licenses issued;  Total of 8 licenses in use)

  "Bioinformatics_Toolbox" v28, vendor: MLM
  floating license

    4 RESERVATIONs for GROUP galaxygroup (lm/27010)
    4 RESERVATIONs for GROUP pellegrinigroup (lm/27010)

Users of Distrib_Computing_Toolbox:  (Total of 3 licenses issued;  Total of 1 license in use)

  "Distrib_Computing_Toolbox" v27, vendor: MLM
  floating license

    alnersh n47 /dev/tty (v27) (lm/27010 1301), start Tue 4/9 11:44

Users of MATLAB_Distrib_Comp_Engine:  (Total of 16 licenses issued;  Total of 0 licenses in use)

Users of SIMULINK:  (Total of 2 licenses issued;  Total of 0 licenses in use)

Users of Control_Toolbox:  (Total of 2 licenses issued;  Total of 0 licenses in use)

Users of Simulink_Control_Design:  (Total of 2 licenses issued;  Total of 0 licenses in use)

Users of Simulink_Design_Optim:  (Total of 2 licenses issued;  Total of 0 licenses in use)

Users of Symbolic_Toolbox:  (Total of 1 license issued;  Total of 0 licenses in use)


/u/local/apps/matlab/7.14/etc/glnxa64/lmstat -c /u/local/licenses/license.matlab -S MLM
 
#############
All done on 09/04/13 (European, I mean logical, date notation)!

All the same information as in the previous examples, except you can also tell that alhead and alnersh are using MATLAB licenses on nodes 2173 and 27, respectively.