Sometimes we have users that load up NX and leave for hours and we run out of floating licenses. Is there a way to send a remote command to the License Server to kill the session?
I already have a script to display who is using what license. I have LM tools on my machine, but didn't want to get to into it and have IT yelling at me for messing with the server. But if there is a procedure, I can forward to the IT team so they can boot the lingering user or use it myself.
Solved! Go to Solution.
The lmutil.exe is in the "UGFLEXLM" folder in the tree where NX is installed.
If you have access to download files from GTAC, in the "Siemens PLM Licensing" -> documentation area is a file "fnp_LicAdmin.pdf" which covers this utility. Note they used to have individual commands for each function (e.g. "lmremove ...") - now, they only supply lmutil, so you use the original command as the first argument to lmutil instead ("lmutil lmremove ...").
The question I have is that NX uses a "heartbeat" mechanism to re-check out licenses that the client has checked out - does lmremove actually clear the *client* as well, or only the server?
i.e. if I "lmremove" a gateway license from user X, in 5 (or whatever) minutes, does the client just re-check out the gateway it had before?
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled
Ok, I have done some digging and this is what I know and how to do it.
1) Open a Dos prompt and get to your UGFLEXLM folder on your local machine. (program files/siemens/nx #/ugflexlm)
2) Run the "lmutil lmstat [-c license_file_list] -a" command ( the license_file_list info is a in the format of port@server for me, might not for you, and is "optional".) Does not work if I don't put in the port@server like this: "lmutil lmstat -c port@server -a"
3) You will need some information from this report.
4) You will then run lmutil lmremove...... There are 2 ways to run this command and need different info (found from lmstat)
option 1) lmutil lmremove [-c license_file_list] feature user user_host display
option 2) lmutil lmremove [-c license_file_list] -h feature server_host port handle
Go to this site to understand what each info variable is from the lmstat and how it fits with lmremove. http://media.3ds.com/support/simulia/public/flexlm108/EndUser/chap7.htm
As far as I can tell I can kick off an NX user. I have tried this with a self session and the license does disappear from the lmstat, BUT I was still able to use NX and it seemed after a short time NX just grabbed a license again because there were some available. We need to test when all licenses are out and see what happens and someone is kicked and a different person grabs that license. Should be fun!!!
This is the script that i use :
Copy the text to a ".txt"-file.
Rename into "licensecheck.bat"
Paste the text from below into it:
- You have to correct the second line , "cd C:\siemens\...." into the directory where your flexlm is installed.
if not EXIST C:\temp mkdir C:\temp
lmutil lmstat -a > c:\temp\licenses-in-use.txt
I use the attached .bat file ( Rename from .txt to .bat ). It lists the used licences then prompts for details of the one you wish to kill of.
"NX10101_drafting" v31.0, vendor: ugslmd nodelocked license, locked to ethernet address "6805ca29e1ec" hunt_m eng-mh1 eng-mh10.0 (v29.000) (CADSERVER/28000 5413), start Mon 9/4 15 :50
From example above username = hunt_m, hostname = eng-mh1, licence feature = NX10101_drafting and display = eng-mh10.0