How do I monitor the usage of license keys for MATLAB and toolboxes?

604 views (last 30 days)
I would like to monitor the usage (number of users) of license keys for MATLAB and other MathWorks products.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Aug 2021
Edited: MathWorks Support Team on 18 Aug 2021
If you have a network license, there are several ways to monitor license usage:
  • Log File
  • Flexera Software


To check current license usage, you can use the lmstat function 
The lmstat function will display the following information:
  • Username of person that checked out the license.
  • Hostname of computer that the license was checked out on.
  • Date and time that license was checked out.
To use the lmstat function, open Terminal and run the following commands.
cd $MATLABROOT/etc/glnxa64
./lmutil lmstat -a
cd $MATLAB/etc/maci64
./lmutil lmstat -a
  1. Open the folder $MATLABROOT\etc\win64
  2. Run "lmtools.exe".
  3. Go to the "Server Status" tab.
  4. Click on "Perform Status Enquiry".
Alternatively, you can open Command Prompt and run the following commands.
cd $MATLABROOT\etc\win64
lmutil lmstat -c license.dat -a
By default, $MATLABROOT = C:\Program Files\MATLAB\R20XXx
If you cannot find the above directories, you may not be on the license server. Please refer to following support article:
For more information about lmtools and lmstat, please see the following documentation:

Log File

For a long-term record of license usage, view the license manager log file.
The network license manager log file will show license check-ins and check-outs:
  • When someone starts using a product, it checks out a key.
  • When someone stops using a product, it checks the key back in
The following are the default locations for each supported operating system:
You can also view the log file on Windows in lmtools.exe.
  1. Go to "Config Services" tab.
  2. Click on "View Log".
The log will be displayed in a pop-up window.
Example of lmlog.txt:
11:40:22 (lmgrd) -----------------------------------------------
11:40:22 (lmgrd) Please Note:
11:40:22 (lmgrd)
11:40:22 (lmgrd) This log is intended for debug purposes only.
11:40:22 (lmgrd) There are many details in licensing policies
11:40:22 (lmgrd) that are not reported in the information logged
11:40:22 (lmgrd) here, so if you use this log file for any kind
11:40:22 (lmgrd) of usage reporting you will generally produce
11:40:22 (lmgrd) incorrect results.
11:40:22 (lmgrd)
11:40:22 (lmgrd) -----------------------------------------------
11:40:22 (lmgrd)
11:40:22 (lmgrd)
11:40:22 (lmgrd) Done rereading
11:40:22 (lmgrd) FLEXnet Licensing (v11.4.0.0 build 31341) started on license_server (IBM PC) (4/20/2008)
11:40:22 (lmgrd) Copyright (c) 1988-2006 Acresso Software Inc. All Rights Reserved.
11:40:22 (lmgrd) US Patents 5,390,297 and 5,671,412.
11:40:22 (lmgrd) World Wide Web: http://www.acresso.com11:40:22 (lmgrd) License file(s): C:\Program Files\MATLAB\R2007a\flexlm\license.dat
11:40:22 (lmgrd) lmgrd tcp-port 27000
11:40:22 (lmgrd) Starting vendor daemons ...
11:40:22 (lmgrd) Started MLM (pid 10216)
11:40:22 (MLM) Server started on license_server for:MATLAB
11:40:22 (MLM) SIMULINK
11:40:22 (lmgrd) MLM using TCP-port 1253
11:40:24 (MLM) OUT: "MATLAB" jsmith@license_server
11:51:04 (MLM) IN: "MATLAB" jsmith@license_server
12:18:07 (MLM) OUT: "MATLAB" jsmith@license_server
12:20:25 (MLM) OUT: "SIMULINK" jsmith@license_server
This logfile indicates that the user jsmith took out a MATLAB key from the server license_server at 11:40 and that it was returned at 11:51 when he exited MATLAB. Then, at 12:18 he took out a MATLAB key again, and this time, took out a SIMULINK key at 12:20.

Flexra Software (Not Provided by MathWorks)

Flexera Software offers FlexNet Manager, which is software used for tracking and monitoring license usage. 
For more information, please visit Flexera's website:
Colin Fraser
Colin Fraser on 12 Sep 2019
On the base LMTools, the log file can go as far back as when you first opened it or added the "+" flag so that the license manager would always append the log file.

Sign in to comment.


No tags entered yet.

Community Treasure Hunt

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

Start Hunting!