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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Release a licence withou closing Creo

CarlosCaseras
7-Bedrock

Release a licence withou closing Creo

In a flexlm with a number of floating licences, I'd like to know if there is a way in which a user can release the Creo licence without closing Creo. This would allow to stop working, lend your licence to another user, and after that, regain the licence and resume your sesion.

Is it posible? Does anybody have a tool to do that?

Thank you!

Carlos

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

when you launch Creo and leave it inactive for some period, it will return the license.

  1. when you start Creo session, Creo license cannot be returned in first 15 or 20 minutes from the session start
  2. the length of period is set on license server in ptc.opt file, by default it is 7200 second
  3. you can return license manually using ptcflush.bat launched from command prompt window
  4. ptcflush.bat needs information displayed by ptcstatus.bat

The above mentioned tools can be used to simulate functionality. Users must be carefull when they are using it.

MH


Martin Hanák

View solution in original post

16 REPLIES 16

Hi,

when you launch Creo and leave it inactive for some period, it will return the license.

  1. when you start Creo session, Creo license cannot be returned in first 15 or 20 minutes from the session start
  2. the length of period is set on license server in ptc.opt file, by default it is 7200 second
  3. you can return license manually using ptcflush.bat launched from command prompt window
  4. ptcflush.bat needs information displayed by ptcstatus.bat

The above mentioned tools can be used to simulate functionality. Users must be carefull when they are using it.

MH


Martin Hanák

Thank you Martin,  that answer is great!

I have found the ptc.opt file and It is set to 7200 as you said. I can simply modify that. I'm not sure if that is already working, but I will try it. Thank you!

For the manual flush, it is good to know that the option exists but it is not very user-friendly. Indeed I couldnt find all the parameters in the ptcstatus.bat to make it work. The command is written as ptcflush [feature][license server][port][handle]. where:

[feature]:  PROE_FLEX3C  ???

[license_server]: xxxx@mylicenseserver (this is the only one I think I know)

[port]: no idea

[handle]:  what?

Do you think it is posible to modify the default ptcflush.bat to add these options?  and launch it from Windows instead of from the system window inside Creo?

Kind regards

Carlos

Hi,

to get port and handle values, you have to run ptcstatus.bat  - see the following picture.

ptcstatus.png

[feature]:  PROE_

[license_server]: HOMER

[port]: 7788

[handle]:  107

MH


Martin Hanák

Cool, I'm really impressed. And it works!

Is there any chance to make this functionallity fully automatic in one click? I mean something like executing a custom script or a macro that finds your username, finds the handle  of that user (which varies from one session to another) and then flushes that license?

Some ideas (but any other is welcome):

I assume it can't be done with a mapkey because you can't provide inputs to a mapkey, so the macro will never know what is the handle you want to flush.

But could it be done with a .bat script to be executed from windows?

Could it be done with a weblink api inside Creo? J-link api?

Best regards

Carlos

Hi,

you can use any programming tool (independent on Creo) you know. The application will run ptcstatus command at the beginning (see example below) and then processes the contents of the output file.

"C:\PTC\Creo2_M070\Creo 2.0\Parametric\bin\ptcstatus.bat" -nopause >%TEMP%\PtcstatusOutput.txt

MH


Martin Hanák

Hi,

I have Christmas gift for you .

MH


Martin Hanák

That is awesome, Martin! Thank you so much! It Works! and it is so simple to use! I will let all my group know. (I must have been good this year)

The ability to flush others, if my understanding is correct, is a "vulnerability" in the server that has been corrected. That functionality is available for any Creo user, and your program just makes it easier to use.

Anyway, for us, that is not a problem at all... indeed it is something we will take advantage of.

Thanks again, Martin

Kind regards

Carlos

Martin,

I get a message that I am not a license administrator, do you know what needs to be done to make it work?

Thanks,

Dan

Here is the ouput:

******************************
(ross@SST0102) 127 SSTSECSYS 7788   515
******************************
lmutil - Copyright (c) 1989-2008 Acresso Software Inc. All Rights Reserved.
lmremove: You are not a license administrator. (-63,199)

******************************
(ross@SST0102) 10119 SSTSECSYS 7788   116
******************************
lmutil - Copyright (c) 1989-2008 Acresso Software Inc. All Rights Reserved.
lmremove: You are not a license administrator. (-63,199)

******************************
(ross@SST0102) PROE_FoundationAdv SSTSECSYS 7788   212
******************************
lmutil - Copyright (c) 1989-2008 Acresso Software Inc. All Rights Reserved.
lmremove: You are not a license administrator. (-63,199)

MartinHanak
24-Ruby II
(To:dross)

Hi,

reported error message is mentioned in https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS47365

MH


Martin Hanák

Hi,

please be VERY carefull with an idea to get users such functionality. If some of your users is curious you can have troubles soon. Any user can use not only this functionality from FlexNet commands set. Any user is also able to shutdown the whole server!!! Even though he has no rights. He can simply send a command to the server via network... and you have no chance to block him.

     Kind regards

         Jan

Hi,

I think that regular user does not have administrator access rights on the server and therefore he cannot turn on/off services on the server ...

MH


Martin Hanák

Hello,

you are not right. Anobody can does that from his computer without any extra rights, unfortunatelly.

      Kind regards

            Jan

The ability to flush a license depends on which version of the license server your running. If your running the old one, anyone can flush it. If your running the new one it's restricted by default to folks that have been defined as admin's in the license server.

I recommend going with the new license server. It allows you to do stuff via the web. For example you can modify the ptc.opt file and re-read it without shutting down the license server.

Also you can return borrowed licenses early.

I'm attaching my powerpoint for the talk I gave at the 2014 conference. Read the notes section for each page.

I've found out additional information subsequent to giving the talk. But this will give you a pretty advanced knowledge of licensing.

Thank you very much for your presentation. There's a lot of interesting information there.

Kind regards

Carlos

Hello David,

I saw your presentation. I would like to note that there is a possibility how to define path where the license server is installed.

When an installation package is downloaded and unzipped then you can go to the directory "....\pim\xml" and then edit the file "flexadmin.xml", especially lines 8 and 9. In [brackets] are system or script variables.

flexnet_install_path.jpg
When you defined your path, save the file and run an Creo installation as usual.

    Kind regards

                   Jan

Thanks, that's good to know.

Top Tags