Simcenter 3D Solutions How many license tokens are in use, and by whom? How can I monitor this?

2024-02-07T09:14:26Z
Simcenter 3D

Summary


Details

We have license tokens (Value based licensing) in use, but how can we see the number of tokens that are currently in use?

How many are still available, and who is using them? 

Solution

Update 11/11/21: Slightly enhanced the script. Simplified the result and added Manufacturing tokens.

Update 31/10/22: Attached example file below --> Rename *.txt to *.bat

Example file which can be used as a basis to start: (look below for some detailed instructions)

Check Tokens.txt (1.05 KB)

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.

There are already two older Articles written on this Finding number of available Simcenter tokens and How a Simcenter user can know the number of Token available?

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:

  1. 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
    1. 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
      1. 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.
        1. 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:

          Example result

          Remarks:

          1. The Feature that is being looked at 'nx_design_token'.
            1. The number of tokens that are available when none are in use. This is the total amount available at your site.
              1. 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 :) ).
                1. The user(s) that have the tokens in use.
                  1. The system (computer) that the user is using accessing the tokens.
                    1. What "Feature" was requested and not available and is now using the tokens instead.
                      1. How many tokens does this use, for this particular feature by this user.
                        1. Second feature that is being checked, in this case 'simcenter_token'
                          1. A total number of 1000 available
                            1. 30 currently in use.
                              1. Again the users that have them in use (2 times, both using 15 for the same feature).
                                1. On what system(s)
                                  1. What feature was actually requested by NX/SimCenter 3D
                                    1. 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.

                                      Dennis de Brouwer

                                      Notes

                                       More information about licensing can be found in

                                      FAQ's: (TC) Licensing: Collection of (TC) Licensing FAQ's

                                      KB Article ID# PL8514452

                                      Contents

                                      SummaryDetails

                                      Associated Components

                                      Pre/Post