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

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

MathWorks Solution

If you have a network license, there are several ways to monitor license usage:
  • Flexera Software
  • LMSTAT
  • Log File

Flexera Software (Not Provided by MathWorks)

This article addresses how to monitor license usage in real time, intended for troubleshooting purposes only. If you are looking to monitor long-term usage instead, Flexera Software offers FlexNet Manager, which is software used for tracking and monitoring license usage. 
For more information, please visit Flexera's website:

LMSTAT

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.
Linux:
cd $MATLABROOT/etc/glnxa64./lmutil lmstat -a
MacOS:
cd $MATLAB/etc/maci64
./lmutil lmstat -a
Windows:
  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\win64lmutil 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:Is there a way for licenses to be monitored from the client machine instead of the server?
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.
By default, every time the license manager is restarted, the log file gets overwritten. To append entries to the log file rather than overwrite them, please follow the instructions from the link below:
 
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:
Linux:
/var/tmp/lm_TMW.log
MacOS:
/var/tmp/lm_TMW.log
Windows:
$MATLABROOT\etc\lmlog.txt
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:
13:11:03 (lmgrd) -----------------------------------------------
13:11:03 (lmgrd) Please Note:
13:11:03 (lmgrd)
13:11:03 (lmgrd) This log is intended for debug purposes only.
13:11:03 (lmgrd) In order to capture accurate license
13:11:03 (lmgrd) usage data into an organized repository,
13:11:03 (lmgrd) please enable report logging. Use Flexera's
13:11:03 (lmgrd) software license administration solution,
13:11:03 (lmgrd) FlexNet Manager, to readily gain visibility
13:11:03 (lmgrd) into license usage data and to create
13:11:03 (lmgrd) insightful reports on critical information like
13:11:03 (lmgrd) license availability and usage. FlexNet Manager
13:11:03 (lmgrd) can be fully automated to run these reports on
13:11:03 (lmgrd) schedule and can be used to track license
13:11:03 (lmgrd) servers and usage across a heterogeneous
13:11:03 (lmgrd) network of servers including Windows NT, Linux
13:11:03 (lmgrd) and UNIX.
13:11:03 (lmgrd)
13:11:03 (lmgrd) -----------------------------------------------
13:11:03 (lmgrd)
13:11:03 (lmgrd)
13:11:03 (lmgrd) Server's System Date and Time: Tue Jul 28 2026 13:11:03 Eastern Daylight Time
13:11:03 (lmgrd) pid 5748
13:11:03 (lmgrd) Changing message security level from -1 to 0
13:11:03 (lmgrd) SLOG: Summary LOG statistics is enabled.
13:11:03 (lmgrd) Done rereading
13:11:03 (lmgrd) FlexNet Licensing (v11.19.7.0 build 294770 x64_n6) started on MW-PF3ZKSE7 (IBM PC) (7/28/2026)
13:11:03 (lmgrd) Copyright (c) 1988-2024 Flexera. All Rights Reserved.
13:11:03 (lmgrd) World Wide Web: http://www.flexerasoftware.com
13:11:03 (lmgrd) License file(s): C:\Program Files\MATLAB\R2026a\etc\license.dat
13:11:03 (lmgrd) lmgrd tcp-port 27000
13:11:03 (lmgrd) (@lmgrd-SLOG@) ===============================================
13:11:03 (lmgrd) (@lmgrd-SLOG@) === LMGRD ===
13:11:03 (lmgrd) (@lmgrd-SLOG@) Start-Date: Tue Jul 28 2026 13:11:03 Eastern Daylight Time
13:11:03 (lmgrd) (@lmgrd-SLOG@) PID: 5748
13:11:03 (lmgrd) (@lmgrd-SLOG@) LMGRD Version: v11.19.7.0 build 294770 x64_n6 ( build 294770 (ipv6))
13:11:03 (lmgrd) (@lmgrd-SLOG@)
13:11:03 (lmgrd) (@lmgrd-SLOG@) === Network Info ===
13:11:03 (lmgrd) (@lmgrd-SLOG@) Listening port: 27000
13:11:03 (lmgrd) (@lmgrd-SLOG@)
13:11:03 (lmgrd) (@lmgrd-SLOG@) === Startup Info ===
13:11:03 (lmgrd) (@lmgrd-SLOG@) Is LS run as a service: Yes
13:11:03 (lmgrd) (@lmgrd-SLOG@) Server Configuration: Single Server
13:11:03 (lmgrd) (@lmgrd-SLOG@) Command-line options used at LS startup: -c C:\Program Files\MATLAB\R2026a\etc\license.dat -l C:\Program Files\MATLAB\R2025b\etc\win64\lmlog.txt -z -s
13:11:03 (lmgrd) (@lmgrd-SLOG@) License file(s) used: C:\Program Files\MATLAB\R2026a\etc\license.dat
13:11:03 (lmgrd) (@lmgrd-SLOG@) ===============================================
13:11:03 (lmgrd) SLOG: FNPLS-INTERNAL-VL1-40000
13:11:03 (lmgrd) Starting vendor daemons ...
13:11:03 (lmgrd) Started MLM (pid 29472)
13:11:03 (MLM) Listener Thread: running
13:11:23 (MLM) OUT: "MATLAB" jsmith@license_server
13:11:23 (MLM) AUXINFO: [locale=en_US],[location=840],[user=bgould]
13:12:02 (MLM) IN: "MATLAB" jsmith@license_server
This logfile indicates that the user jsmith checked out a MATLAB key from the server license_server at 13:11 and that it was returned at 13:12 when he exited MATLAB. 

Categorías

Más información sobre Manage Products en Centro de ayuda y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Did this resolve your question?

No


Translated by