Select to view content in your preferred language

Using "lmutil lmstat" to check License Mgr v10.+ status on a remote machine (solution)

57858
23
06-24-2010 10:17 AM
RebeccaStrauch__GISP
MVP Emeritus

updated Feb 20, 2018

This is to help anyone that may use the "lmutil" command line utility to check the status of concurrent license usage on a remote machine (i.e. from a local, non license manager (LM) machine).  Several things have changed from the 9.3.1 LM to the v10 LM and minor changes are needed to get this to work (at least with the LM release with the beta/release candidate).

Syntax we used in 9.3.1

lmutil lmstat -a -c   "\\<IP to out LM server>\Program Files\ESRI\License\arcgis9x\ArcINFO9.lic"

or "....\viewer9.lic".    This command would list all the licenses available and in use for that particular LM server.

Syntax we need to use in version 10

lmutil lmstat -a -c   "\\<IP to out LM server>\Program Files\ArcGIS\License10.0\bin\service.txt"

Beside the path/location and file name, the file format has also changed for the ArcGIS 10 license manager.  They replaced the multiple <product>.lic files with the service.txt which makes it much easier when you have to lock the LM to a port (for firewall issues) --- one file to deal with instead of multiple.    However, the one problem I ran into is that the default/generic "this_host" prevented the lmutil command from looking at the remote LM machine.  Instead, it responded that the license manager was not running on my <current machine name>. The quick fix is to change "this_host" to your LM server's name or IP address in the services.txt file.  At least that fixed it for me.

BTW - the command line syntax above assumes you are in a directory that can run lmutil, i.e.,either beacuse 1) it's in your path, 2) you have the lmutil.exe copied to your current directory, or 3) you are in the "C:\Program Files\ArcGIS\License10.0\bin" directory.

This was logged as a "bug" with this work around as the solution:
[#NIM058540  The command "lmutil lmstat" does not function properly for remote systems in License Manager 10 ]

Edit the service.txt file as follows:
Old - "SERVER this_host ANY"
New - "SERVER <hostname> ANY"

Hopefully this will save someone else using the lmutil a little time when making the switch.  -b

----

UPDATE (works with 10.4.x license manager too), now I just use:

lmutil lmstat -a -c @<servername>

with the @ sign, but  <server> will be the location of your license manager.   I have a copy of the lmutil,exe in the same folder as I create a  chk_lic.bat file with the line above.

EDIT: February 2018.  Someone was looking for the WhereDidAllTheLicensesGo by Julie Skuba (whose profile does not look active) on the ideas page Add new functionality to License Manager - Usage &amp; Analysis Tools .  It seems all the links for download of this tool are broken right now.  I found a version from 2004 that I zipped, but didn't see a way to upload it to the ideas page, so I will add to this post for others.  I am not the author of this script, and there may be other posts on the tweaks that are needed for newer LM versions...just posting here as a courtesy. 

23 Replies
RichardDaniels
Honored Contributor
Well, our IT department upgraded the server that does our DNS hostname lookup and put us on a faster network, now every thing is SLOWER and I'm seeing the same issue reported regarding delays in updating the ESRILicense.txt file when lmstat is run. I've tried adding the port number, 27000, and this does not appear to speed anything up. I just tried using the IP address vs. the server name and this does not appear to resolve the issue.

This behavior began about a month ago on two different XP SP 3 computers. One other source of delay is McAfee and your viras scanning software.

Other change is we applied SP 1 for ArcGIS License Server 10, I wonder if that has an impact?
0 Kudos
BrentKastor
Emerging Contributor
Hello,

I am having the same issue.  My error message reads:

Microsoft .NET Framework

X Unhandled exception has occurred in your application.  ...

The process cannot access the file ' C:\Users\kastorb\Desktop\ESRILicenseUse\ESRILicenseUse.txt' because it is being used by another process.

I have tried all of the steps previously listed.  Did you end up finding a solution?  I found it interesting that the "ESRILicenseUse.txt" file gets populated with the license use data, it is just a matter of the WHATLG GUI reading the .txt file.

My PC is Windows 7 64-bit (could that be an issue?).

Thanks!

Well, our IT department upgraded the server that does our DNS hostname lookup and put us on a faster network, now every thing is SLOWER and I'm seeing the same issue reported regarding delays in updating the ESRILicense.txt file when lmstat is run. I've tried adding the port number, 27000, and this does not appear to speed anything up. I just tried using the IP address vs. the server name and this does not appear to resolve the issue.

This behavior began about a month ago on two different XP SP 3 computers. One other source of delay is McAfee and your viras scanning software.

Other change is we applied SP 1 for ArcGIS License Server 10, I wonder if that has an impact?
0 Kudos
V_StuartFoote
MVP Alum
Brent,

Suspect that is still going to be a manifestation of delay in closing the ESRILicenseUse.txt during lmstat lmutil read of your license server.  The lmstat.bat file does need to be edited and new versions of lmutil.exe placed in the programs folder.

See my earlier 19 Nov 2010 post in this thread for details and work around. Try the command line examples and time the exchanges with and without firewall, and with exceptions in place.

Post back if you still have questions.

Stuart
0 Kudos
BrentKastor
Emerging Contributor
Hello,

Thanks for the quick response - it is certainly appreciated!

I followed the instructions to a "T".  I changed my .bat to port 27000.  I tested it from a cmd prompt, and when I did not include the port, it took 10 seconds to return the license information.  When I tested again from the command prompt using the port number, it was almost an instant response with the license information.  I then tried to run the application from the license server pc and received the error - "Windows cannot access the specified device, path, or file.  You my not have the appropriate permissions to access the item."  I still find it perplexing that I can run the executable from my pc, and it will return the license data to the .txt file, but the WHATLG app will not scroll through the results.  Do you still think it is a latency/delay issue in reading the file?  Thanks for your assistance!

Brent

Brent,

Suspect that is still going to be a manifestation of delay in closing the ESRILicenseUse.txt during lmstat lmutil read of your license server.  The lmstat.bat file does need to be edited and new versions of lmutil.exe placed in the programs folder.

See my earlier 19 Nov 2010 post in this thread for details and work around. Try the command line examples and time the exchanges with and without firewall, and with exceptions in place.

Post back if you still have questions.

Stuart
0 Kudos
V_StuartFoote
MVP Alum
Brent,

When you set up the app on the license server, you may need to identify the host as 27000@localhost in the lmstat.bat file. Check to see if the ESRILicenseUse.txt file is being created by the batch, and that you are able to access it with your account.

It is also conceivable that the .NET 1.1 framework components needed for the WHATLG GUI are not present on the license server. Or that there is a file permission issue as installed such that when run--either the app faults, or the ESRILicenseUse.txt file is unreadable. You might try installing to All Users\Shared Documents, or Program Files\Common to work around that.

Same issues with .NET and file access on your PC.

Stuart
0 Kudos
curtvprice
MVP Alum
We use this syntax (the server supplies all the detail I guess):

[INDENT]lmutil.exe lmstat -a -c 27000@<hostname> [/INDENT]
(The "27000" is optional but in your situation it sounds like it will may run faster that way.)

and in the license file, the (valid) IP name localhost:

[INDENT]SERVER localhost ANY 27000[/INDENT]

Using these settings, we can query both 9.x and 10.x license servers, (as long as we are using the 10.x version of lmutil.exe)
[INDENT]> lmutil -v
Copyright (c) 1989-2008 Acresso Software Inc. All Rights Reserved.
lmutil v11.6.1.0 build 66138 i86_n3[/INDENT]
0 Kudos
RichardDaniels
Honored Contributor
This still applies, substitute the new 10.2 FlexLM lmutil.exe to the one provided by the download and you are in business.
0 Kudos
ArtoVuorela
Emerging Contributor
There is this new version 1.2 of Where Have All The Licenses Gone at http://resources.arcgis.com/gallery/file/arcobjects-net-api/details?entryID=033BCCBB-1422-2418-3414-... - and isn't it possible to unzip it as a normal user on some normal folder on C (rather than program files), therefore no hassle with administrator account and rights for that folder.
0 Kudos
V_StuartFoote
MVP Alum
Arto,

There is this new version 1.2 of Where Have All The Licenses Gone


Well not really, the 1.2 version of WHATLG was posted by Julie Skuba March 2011, so coincident with 10.0 -- the GUI is still .NET version 1.1 dependent. And you'd need to swap in the current FlexNet Publisher lmgrd.exe (v 11.12) executable downloaded here: http://www.globes.com/support/fnp_utilities_download.htm -- and also make the adjustments noted by Curtis P. and Rich D. in posts , but within that context the utility is still reasonably functional.

Stuart
0 Kudos
ChelseaRozek
MVP Regular Contributor

Thanks for posting this! I got it working with our 10.6 license manager. It doesn't show all of the licenses in the GUI, but they're there in the .txt, so I'm happy