The Network License Manager can be started or stopped using the following methods depending on the Operating System of the server:
Windows
Option 1: Using LMTOOLS.exe (recommended)
To use the LMTOOLS Utility (lmtools.exe) to start the license manager, follow this procedure:
- Navigate in Explorer to $MATLAB\etc\win64, where $MATLAB is the MATLAB root directory on your machine. This is where you have MATLAB installed and is often C:\Program Files\MATLAB\R20XXx\etc\win64. The Xs represent the release number you are using.
- Double-click on lmtools.exe.
- Click on the Start/Stop/Reread tab.
- Click on the "Start Server" button to start the license manager, or the "Stop Server" button to stop it.
Option 2: Using Windows Services
While LMTOOLS is the recommended method, it is also possible to start and stop the license manager using the Windows services applet. To do so:
- Navigate to the "Services" control window. Generally this is listed as an item under "Administrative Tools" under the "Control Panel."
- Locate the "MATLAB License Server" service. If you have manually named the service, locate the name of that service instead.
- Double-click the service to bring up the Properties window, and use the appropriate buttons to Stop, Start, Restart, Pause, or Resume the License Manager.
Option 3: Start the license manager as an application via command prompt
It is also possible to start the license manager using the DOS (command) prompt. To do so, follow this procedure:
- Open up a Windows Command Prompt by opening the Windows Start Menu, typing in Command Prompt, and clicking the first result.
- Change directories in the prompt to the $MATLAB\etc\win64 directory, where $MATLAB is the MATLAB root directory on your machine.
- Type the following command:
lmgrd.exe -c <PATH_TO_LICENSE_FILE> -l <PATH_TO_LOG_FILE>
For example,
lmgrd.exe -c license.dat -l lmlog.txt
To stop the license manager from Command Prompt, enter the following command:
lmgrd.exe -c <PATH_TO_LICENSE_FILE> lmdown -q
Linux/Mac OS Systems
For Linux/Mac OS, the license manager is started and stopped through the terminal. For Mac OS, Terminal can be launched from Applications/Utilities. Once you have a terminal window, the license manager can be started and stopped using the methods below:
For new installations of the network license manager on Linux, the LSB Core libraries are required. See:
Option 1: Using lmstart
Note: The script is only available if you installed the License Manager using the MathWorks Installer or ISO/DMG Image.
You can start the license manager daemons on a Linux or macOS computer using the lmstart script (located in the matlabroot/etc folder), where matlabroot represents the name of your top-level MATLAB installation folder. The lmstart script stops any currently running daemons and starts new ones.
To run lmstart on a macOS computer, open a terminal window using the Terminal application (found in /Applications/Utilities) and navigate to the /etc folder in your MATLAB installation folder:
cd /Applications/MATLAB_R2022b.app/etc
Option 2: Using the license manager binaries
- Change directories in terminal to the $MATLAB/etc/maci64 directory on Mac OS or $MATLAB/etc/glnxa64 on Linux, where $MATLAB is the MATLAB root directory on your machine.
- Type the following command:
./lmgrd -c <PATH_TO_LICENSE_FILE> -l <PATH_TO_LOG_FILE>
For example:./lmgrd -c license.dat -l lmlog.txt
To stop the license manager from Terminal, enter the following command:./lmutil lmdown -c <PATH_TO_LICENSE_FILE> -q
Option 3: Using Boot Scripts