There are several ways to get this information. You can look it up in the License Server log file. This will give you a good overview of what has been used since the last restart of the license server. However, it's a very manual process, as you have to simply look at each line that contains a token, to give you an idea of how many tokens have been used in the past, by whom and for what.
What would be more useful is the actual current state of tokens in use.
You can use the default tools for this, for example, look it up in LMtools, or run a manual 'lmutil.exe lmstat' command in a dos prompt.
To make the token query a bit more user friendly, one can write a Batch script. An example script is given below, but you might need to modify it slightly to your needs (also attached at the bottom of this page):
@ECHO OFF
ECHO Getting tokens, it might take a few seconds for the results to appear!
SET NX_TOKENS_IN_USE=C:\Temp\Tokens_in_Use.txt
ECHO Results will be storred in %NX_TOKENS_IN_USE%
ECHO.
ECHO Tokens in use > "%NX_TOKENS_IN_USE%"
ECHO. >> "%NX_TOKENS_IN_USE%"
ECHO NX design tokens: >> "%NX_TOKENS_IN_USE%"
"%UGII_BASE_DIR%\UGFLEXLM\lmutil.exe" lmstat -c %SPLM_LICENSE_SERVER% -f nx_design_token | findstr /c:"licenses" >> "%NX_TOKENS_IN_USE%"
ECHO. >> "%NX_TOKENS_IN_USE%"
ECHO NX design tokens Processed
ECHO Simcenter tokens: >> "%NX_TOKENS_IN_USE%"
"%UGII_BASE_DIR%\UGFLEXLM\lmutil.exe" lmstat -c %SPLM_LICENSE_SERVER% -f simcenter_token | findstr /c:"licenses" >> "%NX_TOKENS_IN_USE%"
ECHO. >> "%NX_TOKENS_IN_USE%"
ECHO Simcenter tokens Processed
ECHO Manufacturing tokens: >> "%NX_TOKENS_IN_USE%"
"%UGII_BASE_DIR%\UGFLEXLM\lmutil.exe" lmstat -c %SPLM_LICENSE_SERVER% -f nx_mfg_token | findstr /c:"licenses" >> "%NX_TOKENS_IN_USE%"
ECHO Manufacturing tokens Processed
Start "NX Tokens" C:\Windows\notepad.exe "%NX_TOKENS_IN_USE%"
Exit /b 0
Remarks/manual changes:
First I set an output file/location, you can change this if you like. For this change the line --> SET NX_TOKENS_IN_USE=C:\Temp\Tokens_in_Use.txt
Using the default license server set as an environment variable on system level: %SPLM_LICENSE_SERVER%. If this is not the correct one, you can change this to ie. 28000@YourServerName
This example is for 3 kinds of tokens, 'nx_design_token', 'nx_mfg_token' and 'simcenter_token'. You can do this for any kind of feature, not only tokens. You can remove or add lines as required.
In the line just before the exit, the Default Windows Notepad is used to open the file that has just been created to show the results. You may wish to change the application.
How to create this batch file : Open a New txt file in ie. Notepad --> Paste in the "code" above and change the bits as instructed --> Now do a "file" --> "Save as" --> Change "Save as Type" from .txt. to "all Files (*.*)" and give in the name of the file: Tokens_in_use.bat , and store it on your desktop or where you like.
You can now double click on the bat file and it will run the script.
The outcome will look something like this:
Remarks:
The Feature that is being looked at 'nx_design_token'.
The number of tokens that are available when none are in use. This is the total amount available at your site.
This is the number of tokens that are actually in use. So (2) - (3) is the number of tokens left (sorry, you manually have to calculate this :) ).
The user(s) that have the tokens in use.
The system (computer) that the user is using accessing the tokens.
What "Feature" was requested and not available and is now using the tokens instead.
How many tokens does this use, for this particular feature by this user.
Second feature that is being checked, in this case 'simcenter_token'
A total number of 1000 available
30 currently in use.
Again the users that have them in use (2 times, both using 15 for the same feature).
On what system(s)
What feature was actually requested by NX/SimCenter 3D
The number of tokens needed for this feature (per user).
As you can see, the last tokens (nx_mfg_token), none are in use, so also no extra lines are displayed in this case.
I hope this will give you something usable to monitor your tokens.