MATLAB Answers

1

Is there a way for licenses to be monitored from the client machine instead of the server?

I would like to check on license usage for MATLAB from a machine that doesn't have the license manager on it.

Tags

No tags entered yet.

Products

1 Answer

Answer by MathWorks Support Team on 21 Jul 2015
 Accepted Answer

It is possible to monitor licenses on a license server from a MATLAB client. As of R2009b, the necessary files are located in $MATLAB/etc/$ARCH (where $MATLAB is the MATLAB installation directory, and $ARCH is the directory specific to the architecture of the system. Choices include win32, win64, gnlx86, glnxa64, maci, maci64, sol64). For releases older than R2009b on Linux/Unix/Mac, you will need to manually copy the license manager folder from an installation that includes the license manager.
On Windows, "lmutil.exe" can be used to monitor licenses. It needs to be run from the command prompt, not the Run... dialog (Start -> Programs -> Accessories -> Command Prompt.) This file can be found in $MATLAB\etc\win32 (or win64 for 64-bit installations). From the directory where lmutil is located, execute the following:
lmutil lmstat -a -c port@host
Where "port@host" is the port number of the license manager daemon, and hostname (or IP address) of the license server. This information can be found on the SERVER line of the license file. For example: 27000@test.u.edu. Alternately, you can give the path to the license file containing the server information as follows:
lmutil lmstat -a -c "path/to/license/file"
On Mac/Linux/Unix, run the following command from the MATLAB/etc/$ARCH directory in a terminal window:
./lmstat -c port@host -a
For R2009b and higher, lmutil will be located in the $MATLAB/etc/$ARCH directory and can be used in the same way that it is on Windows.
These commands will display who has checked out each product, where they checked it out, and when they checked it out.
As an alternative, you could create a network share for the license manager log file. This log file is for debugging purposes, but it does display license checkout information. On Windows, the location of the log file is specified in the "Config Services" tab of lmtools.exe, by default called lmlog.txt and located in $MATLAB\flexlm. On Linux/Mac/Solaris, by default the logfile will be located in /var/tmp/ and will be called lm_TMW.log.

  4 Comments

Show 1 older comment
Hi Pankaj,
Good catch. I've updated the article accordingly.
Thanks,
-Scott
I believe the command for Mac should be "./lmutil lmstat ...". On Mac & Windows, the "port@host" variant didn't work for me but the following worked: "./lmutil lmstat -a -c ../../licenses/network.lic
When using the port@host approach, I received this error: "lmgrd is not running: License server machine is down or not responding."
I get the same response ("lmgrd is not running..."). However the server I am interested in is remote and the only access I have is through the service interface so I cannot point to a file. Does anyone have another approach to fix this issue?

Sign in to comment.