Anecdotally, problems with stuck licenses do not seem to have been as common over the past couple of years as it was prior to that, so most users have not needed to use the Lmutil tool to fix things. My best guess is that this has to do with continually maturing IT infrastructures and more stable network/internet connections in general. In any case, stuck licenses do pop up from time to time, and understanding how to deal with them as needed can save a lot of time otherwise spent debugging.
To begin with, “lmutil” is an executable that comes along with both client and server-side FlexNet Ansys licensing packages. For a default Windows installation, this can be found within each version’s installation directory like so:
C:\Program Files\ANSYS Inc\vXXX\licensingclient\winx64\lmutil.exe
On the license server side, it can be found here:
C:\Program Files\ANSYS Inc\Shared Files\Licensing\winx64\lmutil.exe
It is also available on Linux systems in the equivalent location relative to the overall installation path – except in a /linx64/ folder rather than /winx64/.
A Detailed Look at How to Use Lmutil to Free UP a License
Detailed information about lmutil’s available arguments can be obtained through its help menu, but in this context the commands we primarily care about are “lmutil.exe lmstat” and “lmutil.exe lmrelease”, shown below.
Lmremove is what we will use to release individual license tasks, but we will need to extract the proper information for those license tasks in order to do so – this is where lmstat comes in. Lmstat is the mechanism through which we can query the current status of the server (which is specified with -c port@server), and we can pass a few different relevant filters into that query. “-a” will return absolutely everything about the licenses present on the server, while “-f” can be used to filter based on a specific license task. I’ve trimmed the output below, but we can see that the “lmutil.exe lmstat -c port@server -a” command gives me a nice snapshot of the server status, as well as individual usage lines for every line item in my source license file. Note that this is an instantaneous snapshot and cannot provide any information about the past usage of the license server.
In my example case, I have Ansys EDT Icepak open – with just the EDT GUI open with an Icepak design present, I happen to know that this corresponds to the license features ‘electronics_desktop’ and ‘electronics3d_gui’. passing this in with -f gives me information about my current session, like so:
Now, for lmremove, there are two available syntaxes to work with. Bolding the values we need to swap in, one option is
lmutil.exe lmremove -c port@server feature user user_host display
and the other is
lmutil.exe lmremove -c port@server -h feature server port handle
The first option will clear out all combinations of feature/user/display that may be checked out, while the second option is more selective in that it is possible to have multiple of the same license checked out under different handles. So, my personal preference is usually the ‘handle’ form.
In our example case, we’ll consider the default port (1055), user_host=localhost, server=LMserver, feature=electronics_desktop, user=josh, display=josh.display, and handle=305, then our commands would be:
lmutil.exe lmremove -c 1055@LMserver electronics_desktop josh localhost josh.display
and
lmutil.exe lmremove -c 1055@LMserver -h electronics_desktop LMserver 1055 305
Upon execution, there is no direct indication that lmremove was successful except that lmstat should no longer report that license. There is also a time limit associated with this command, so be aware that you will likely not be able to continually force-release licenses and it is really a one-off solution in most practical cases.
Wrapping up: lmutil is the top-level executable that lets us interact with a running FlexNet license server. Lmstat is the argument that gives us information on the current status, while lmremove can be used to forcefully release currently checked-out licenses that may be stuck. As a final comment – some applications may automatically check out a new license task if you still have them open when you use lmremove. So, in the case of a stuck license, I would always recommend that you first ensure the user-side application is completely closed and does not have any lingering tasks running in the background before using lmremove.
Hopefully, this removes some of the mystery behind licensing! More and related information can also be found in the FlexNet License Administration Guide that comes along with the server software itself. If nothing else, the lmstat capability on its own can be a very helpful tool for checking your current license status.
You must be logged in to post a comment.