How to Monitor MATLAB Licenses Using FlexLM
MATLAB, developed by MathWorks, is one of the most widely used tools in engineering and science for modeling, simulation, and data analysis.
MATLAB, developed by MathWorks, is one of the most widely used tools in engineering and science for modeling, simulation, and data analysis. MATLAB licenses are often managed through the FlexLM (FlexNet Publisher) license manager, which is used to assign and monitor the use of floating licenses. This type of license allows a limited number of licenses to be shared among multiple users within a corporate network.
To effectively monitor MATLAB licenses on a server using FlexLM, it is essential to run a series of specific commands that allow you to check license availability, real-time usage, and any errors related to failed license issuance.
Required Tools
- The first step in monitoring MATLAB licenses is to download the lmutil utility, provided by Flexera, which includes tools for interacting with license servers. It is important to ensure that you are using a version that is compatible with your installed FlexLM server to avoid incorrect responses.
- Once lmutil is installed, you can query the license server to obtain detailed information about available licenses and their usage.
Check the available MATLAB licenses
To view your available MATLAB licenses and other relevant information, you can run the following command:
lmutil lmstat -a -c port@nomeserver
In this command:
- port@nameserver represents the communication port and the name of the license server that manages MATLAB
- The -a option provides detailed information about all licenses managed by the server.
If MATLAB is configured on multiple servers (a server triad), the command must include all servers:
lmutil lmstat -a -c port@server1,port@server2,port@server3
The generated output will contain information about the available features, the total number of licenses, the number of licenses in use, and any license expiration dates.
Example of FlexLM Output for MATLAB
Below is an example of the output generated by the lmstat command on a MATLAB server:
lmutil - Copyright (c) 1989-2023 Flexera Software LLC. All Rights Reserved.
Flexible License Manager status on Thu 10/24/2024 12:35
License server status: 27000@license_server
License file(s) on license_server: C:\path\to\license\matlab.lic
Vendor daemon status (on license_server):
MLM: UP v11.17.0
Feature usage info:
Users of MATLAB: (Total of 20 licenses issued; Total of 5 licenses in use)
"MATLAB" v39.0, vendor: MLM
floating license
USER001 HOST001 (v39.0) (license_server/27000 876) start Thu 10/24 12:30
USER002 HOST002 (v39.0) (license_server/27000 654) start Thu 10/24 12:15
USER003 HOST003 (v39.0) (license_server/27000 321) start Thu 10/24 11:50
USER004 HOST004 (v39.0) (license_server/27000 987) start Thu 10/24 11:40
In this example, we can see that the server has a total of 20 MATLAB licenses, 5 of which are currently in use. The report also shows detailed information about the users who currently have a license in use, including the user’s name, the client’s hostname, and the session start time.
Real-time usage monitoring
To monitor MATLAB license usage in real time, you can run:
lmutil lmstat -S MATLAB -c port@nomeserver
This command returns a detailed list of the MATLAB licenses currently in use and the users who are using them. The output allows you to identify any system overloads or situations where licenses are fully utilized.
Advanced Notifications and Analytics with Observer
For more efficient and automated management of MATLAB licenses, you can use monitoring tools such as Observer. This software automatically sends FlexLM commands to the servers at regular intervals, collects the data, and presents it in the form of reports and graphs. With Observer, you can:
- Monitor the status of licenses in real time without having to run manual commands.
- Generate detailed reports on usage and consumption peaks.
- Receive automatic email notifications when licenses expire or when all licenses are in use.
Monitoring MATLAB licenses via FlexLM is an essential process for optimizing the use of company resources and ensuring that users always have access to the software when needed. By using commands such as lmstat or implementing advanced solutions like Observer, you can maintain full control over license management and prevent operational disruptions caused by a lack of available licenses.
Find out how Observer can simplify MATLAB license management at your company. Contact us for a free demo and start optimizing today!