How to find Flexlm liscense Feature usage over time?

658 views Asked by At

I have developed a script that screens out the "IN:" and "OUT:" for a particular feature as below, from debug.log file:

  MODULE    IN_OUT  TIMESTAMP       VAR   USAGE
PROE_Flex3C  OUT    4/8/2017 19:27   1     1
PROE_Flex3C  OUT    4/8/2017 19:27   1     2
PROE_Flex3C  OUT    4/8/2017 19:27   1     3
PROE_Flex3C  OUT    4/8/2017 19:27   1     4
PROE_Flex3C  OUT    4/9/2017 2:39    1     5
PROE_Flex3C  IN     4/9/2017 2:42   -1     4
PROE_Flex3C  OUT    4/9/2017 5:45    1     5
PROE_Flex3C  OUT    4/9/2017 5:46    1     6
PROE_Flex3C  IN     4/9/2017 5:50   -1     5
PROE_Flex3C  IN     4/9/2017 5:53   -1     4

For every OUT (liscense Checked out) the script puts +1 and for every checkin the scripts subtracts -1 in VAR field & displays the count under USAGE.

My intend is to plot the usage graph of feature (e.g PROE_Flex3C ) over TIME (Time stamp). When i use the method descried i find that the peak usage goes beyond the total liscense features available. For. .e.g if the total license available for PROE_Flex3C is 34 then the graph shows max license utilization as 40.

FLEXnet Licensing (v10.8.6.2 build 59284 x64_n6). How to make the peak liscense usage count accurate ? What could be missing ?

The problem is the the peak usage counted by such method exceeds the total available license. It looks like the server is leaking liscense?

1

There are 1 answers

0
Scapin On BEST ANSWER

A solution from an acquaintance.

The number of pair 'OUT/IN' could be not connected to the number of tokens for the increment/feature.

For Matlab, if a user has a Network Named User (NNU) token, from the same computer he could launch many instances of Matlab. Each instance puts an 'OUT' in the logfile, but then number of tokens is unchanged for a NNU token with Matlab. To avoid your situation, the solution is to check the pair 'login/OUT' before change the number of token used.

The 'OUT/IN' and the number of used tokens is depending of the editor of your software and the type of license used.

[Update 09/18/2017]

The solution is fully dependent from the editor and your license model. In my situation, your script will give some bad results.

In my example, I use Matlab.

The steps :

  • from the host 'hal9000', I launch a first Matlab session;
  • from the host 'hal9000', I launch a second sessions.

My license file contains more than one license, there is CN and NNU licences, this the reason of the 'DENIED'. The traces in the logfile are the following :

15:10:58 (MLM) DENIED: "MATLAB" my_login@hal9000  (User/host on EXCLUDE list for feature. (-38,348))
15:10:58 (MLM) DENIED: "MATLAB" my_login@hal9000  (User/host on EXCLUDE list for feature. (-38,348))
15:10:58 (MLM) DENIED: "MATLAB" my_login@hal9000  (User/host on EXCLUDE list for feature. (-38,348))
15:10:58 (MLM) OUT: "MATLAB" my_login@hal9000  
15:12:16 (MLM) OUT: "MATLAB" my_login@hal9000  
15:13:06 (MLM) IN: "MATLAB" my_login@hal9000  
15:40:35 (MLM) IN: "MATLAB" my_login@hal9000  

In my case, with a NNU token affected to 'my_login' for the increment MATLAB, the both operations 'OUT' (15:10:58 and 15:12:16) are logged in the logfile but only one token is removed from the number of available tokens for the increment MATLAB.

If the number of tokens before the first 'OUT' was 6, after the second 'OUT' the number will be 5 and not 4, because I use the same host 'hal9000'. After the first 'OUT', all 'OUT' associated with 'my_login@hal9000' are logged but do not change the number of tokens used by 'my_login' on the host 'hal9000'.

I have the same situation for Comsol, where all 'OUT' made by 'my_login@hal9000' are written in the logfile but the number of tokens available is decremented only by 1 token for all 'OUT' operations.

In you script, it could be necessary to check the association 'login@host' to know if you must, or not, change the number of token used, in concordance with your model of license.