cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Compare License Requested vs License Received

JordanMoseley
7-Bedrock

Compare License Requested vs License Received

Hi all,
I have been asked to get data on license usage, specifically looking for what user's request at launch and comparing it to the license they get.

We want to know if the majority of users are selecting the Essentials license and getting the Advanced license only because our pool of Essentials has ran out, or if they actually selected the Advnaced license.

Now, I have made a custom launcher, so I can see what users pick, but I am struggling for a way to see what license they received ultimately. Does anyone have any solution?

Cheers!

1 ACCEPTED SOLUTION

Accepted Solutions


@JordanMoseley wrote:

Hi Martin,
While it is useful for looking at the live usage, it doesn't stipulate what licenses each user intended to pick up.
I suppose it is possible to track what license a user picks in the launcher and then use ptcstatus.bat some time after to find what license that user actually received.
Unless you thought of another use of it?
Thanks for your input!
Jordan


Hi,

you stated that you made a custom launcher.

 

So you can:

  1. detect what license user picks
  2. check whether requested license is available using ptcstatus.bat
  3. write information into log file
  4. launch Creo

Martin Hanák

View solution in original post

11 REPLIES 11

As far as I know, the licenses that might be obtained by a user starting up are determined solely by the .psf file being called when the session is started. Only the licenses specified on the line that looks like:

ENV=CREOPMA_FEATURE_NAME=PROE_EssentialsI PROE_EssentialsIIM

I don't know the precedence of license selection, but can only assume that they are tried in sequence. For example, for the above it likely tries to get a PRO_EssentialsI license first. Failing that, it next tries to get a PROE_EssentialsIIM license, etc.

If you want to pull a license only from a certain pool of them, you need a .psf file that only lists that particular license type.

Hi Ken, thank you for your reply. 
Yeah, we have 5 different licenses and the psf's are setup to cascade up a license when the preceding license pool runs dry. 
However, I don't know when this cascade happens.
The solution I have come up with for the moment is to run a mapkey on start-up using a trail file, this mapkey opens and closes System Information creating a support.inf file which I can then get my launcher to read the current license name. It works but I feel like there must be an easier way.

Is it possible to get the information you need by running a .bat file? If so (and I'm just conjecturing here, I haven't done this), since each of the .psf files has a accompanying .bat file, maybe you could call your metrics obtaining batch file at the end of the Creo batch file that is called with the .psf? A little testing might be needed, but it could be a nice solution...

That would have be brilliant but I believe that the bat calls upon the psf and not the other way around. Also, my launcher bypasses the batch files by copying the contents of the chosen license's psf into the one contained in the bin directory (of which it is the only one in order to stop the default license selection dialog appearing). Hmm...

After chatting with the SysAdmin, they've given me read access to ptc_d.log in the "FLEXnet Admin License Server\logs" directory. 

This log displays the following (info redacted): 

 

11:03:47 (ptc_d) DENIED: "PROE_DesignEss" [User1]@[Computer1]  (Licensed number of users already reached. (-4,342))
11:03:47 (ptc_d) OUT: "PROE_DesignAdv" [User1]@[Computer1] 

 


I can simply parse this log every now and then to gather the data I need since it is not required in real-time.

A few issues are that:

  • The timestamp doesn't include the date (although there are date timestamps thrown out occasionally, so I can interpret that)
  • The file goes back to the last server restart, so it's a little large (~6MB at current, not problematic but daily would be preferred) 
  • The file gets overwritten on start up, so capturing the data before restarts would be crucial to avoid data loss. (for us, this loss will be lost in averaging the data but this may be problematic to others) *Solutions to all provided by Dan below.

That said, if someone has a better method, I'd love to hear it. Thanks all.

Jordan,

 

The FlexLM log files can be appended instead of overwritten when the service is started.  In the FlexLM setup (lmtools.exe), simply include a "+" in front of the log file name.  Also, the log files can be rotated to keep the size down on any single log file.  The rotation can be setup via a scheduled task.  If you rotate the logs nightly, the need for a date stamp is less critical.

 

If you have multiple duplicate features in the license file, you may get "false" denials for which you'll need to account if you're trying to automate the data collection.  i.e. you have 4 seats of PROE_DesignEss with one expiration date and 10 seats of PROE_DesignEss with another expiration date.  FlexLM status will show them on a single line with 14 seats.  However, the log file will show denials after the first 4 seats are consumed followed by a checkout of PROE_DesignEss on the remaining 10 seats.

 

Regards,

 

Dan N.

Hi Dan, first of all, thanks for your reply.

The FlexLM log files can be appended instead of overwritten when the service is started.  In the FlexLM setup (lmtools.exe), simply include a "+" in front of the log file name.  Also, the log files can be rotated to keep the size down on any single log file.  The rotation can be setup via a scheduled task.  If you rotate the logs nightly, the need for a date stamp is less critical.

Ah thank you, that's useful to know! I will get both implemented.

 

If you have multiple duplicate features in the license file, you may get "false" denials for which you'll need to account if you're trying to automate the data collection.  i.e. you have 4 seats of PROE_DesignEss with one expiration date and 10 seats of PROE_DesignEss with another expiration date.  FlexLM status will show them on a single line with 14 seats.  However, the log file will show denials after the first 4 seats are consumed followed by a checkout of PROE_DesignEss on the remaining 10 seats.

I appreciate you pointing this out, all of our licenses share the same expiration it seems, but this might not always be the case so I will consider this when I am building the tool to scrape out the useful data.

Jordan

Hi,

maybe it is simpler to parse ptcstatus.bat output.


Martin Hanák

Hi Martin,
While it is useful for looking at the live usage, it doesn't stipulate what licenses each user intended to pick up.
I suppose it is possible to track what license a user picks in the launcher and then use ptcstatus.bat some time after to find what license that user actually received.
Unless you thought of another use of it?
Thanks for your input!
Jordan


@JordanMoseley wrote:

Hi Martin,
While it is useful for looking at the live usage, it doesn't stipulate what licenses each user intended to pick up.
I suppose it is possible to track what license a user picks in the launcher and then use ptcstatus.bat some time after to find what license that user actually received.
Unless you thought of another use of it?
Thanks for your input!
Jordan


Hi,

you stated that you made a custom launcher.

 

So you can:

  1. detect what license user picks
  2. check whether requested license is available using ptcstatus.bat
  3. write information into log file
  4. launch Creo

Martin Hanák

Hi, 
That is a neat solution, I was concerned with what license the user receives but that doesn't actually matter. It only matters that I log when the user simply doesn't get the license they want. (Even then I could assume that they are just getting the next license with seats available)

I think this is the way that I'll go, thank you.

Jordan

Top Tags