Skip to main content
21-Topaz I
March 27, 2013
Question

License monitoring

  • March 27, 2013
  • 26 replies
  • 22329 views

So what is everyone using now-a-days to monitor the licenses of Pro/E?


Steve G

26 replies

1-Visitor
March 29, 2013
Hey this last one is exactly what I wanted to do with the data at the end
of the year or when licenses ran out. I'm glad I have an actual working
example of it. I think we should just have a nice place to put the code and
install instructions so others can use the same thing. So you used the Log
file for this one?

I set the log flag on all users and collect the logs separately The logs
give feedback as to how many users per day failed to grab a license of
what. But I haven't had time/chance to figure out a
graphical representation that would help in the getting more licenses
scenario. Its almost necessary to show it terms of money/opportunity loss.

This is what I came up with using some perl to process the logs and export
something in terms management can understand. I will be adding this to our
site as a management only view. Excel sucks at everything, even graphs so
that's why I asked my intern to use the google graph system - html 5 piece
of code. She figured that out quickly and get our little graph done. These
are excel:

[image: Inline image 2]

[image: Inline image 1]
note how one day we got licenses Smiley Happy then we got more users again....then
more licenses and we figured a license to user ration that works for our
dynamic. so our efficiency should have gone up.

when the users were fighting for licenses it was horrible. None got to work
on their project without getting interruptions.







On Fri, Mar 29, 2013 at 7:12 AM, Andrew Mansfield
<->wrote:

> We use a perl script that I wrote about 10 years ago that strips the user,
> license and start and stop time information out of the log file and then
> pushes the data into a MySQL database. We look at the results on some web
> pages using php's GD image library. All the graphics are generated on the
> fly. The images that it creates are a bit dated looking. I haven't played
> around with any of it for years: it's simple & just works..
>
> It's not perfect but it gives us a consistent record of who uses what and
> when.
>
> We originally started recording login times back in the early 90's when
> our company bought a bunch of SGI unix workstations each with a seat of
> Pro/Engineer for $30-40k a pop and our CEO wanted to make sure we were
> using them after spending all that cash (even wanted 2 shifts, which was
> impractical and thankfully was never enforced).
>
> If anyone's interested in any of this, I'm happy to forward it along.
>
1-Visitor
March 29, 2013
OK this one is more complicated:


REM *** SET ENVIRONMENT VARIABLES ***
set FLEXLM_DIAGNOSTICS=2
set PDM_LDB_PATH=C:\apps\ptc\workspaces3.4
set
PATH=C:\apps\ptc\proiclient3.4\bin;C:\apps\ptc\ProeWF4\bin;C:\apps\ptc\ProeWF4\mech\bin;%PATH%

set FLEXLM_DIAGNOSTICS=2 -> this line in the start up script makes pro/e or
any other flexlm software create a little text file that looks like this:

"NOTHING" =0KB or:
"
FLEXnet Licensing checkout error: Licensed number of users already reached.
Feature: PROE_EngineerIIAAX
License path: 7788@csdwp-caddat1.intra.cymer.com;
FLEXnet Licensing error:-4,132
For further information, refer to the FLEXnet Licensing End User Guide,
available at "www.macrovision.com".
license file(s): 7788@csdwp-caddat1.intra.cymer.com
lm_checkout("PROE_EngineerIIAAX", PROE_EngineerIIAAX, 197999168, 0xd09d770,
..., 0x0)
FLEXnet Licensing checkout error: Licensed number of users already reached.
Feature: PROE_EngineerIIAAX
License path: 7788@csdwp-caddat1.intra.cymer.com;
FLEXnet Licensing error:-4,132
For further information, refer to the FLEXnet Licensing End User Guide,
available at "www.macrovision.com".
license file(s): 7788@csdwp-caddat1.intra.cymer.com
lm_checkout("PROE_EngineerIIAAX", PROE_EngineerIIAAX, 197999168, 0xd09d770,
..., 0x0)"

when the program see's that the file size is more than 0kb, it reads it and
parses the "Licensed number of users already reached." and the next line
showing the actual license the user wanted.

Its quite informative. It shows the level of desperation. we had 0 the
the beginning of the year. Now I'm noticing a few here and there.

Does this help?




10-Marble
March 29, 2013

Right now it just parses the log file once a day late in the evening. It matches the OUT and IN statements for each user and creates a database record of user, license type, time out, time in.


The downside to using the log file is if I restart the license server the log file gets replaced with a new empty one. I have to remember to save a copy of it and run the scriptmanually otherise I'll lose the day's data.


I suppose I could dosomething more sophisticated with the ptcshutdown or ptcstartserver batch file and automate that part of the process, but I've never bothered with it. I think if I was rewriting this, I might use your method of running ptcstatus periodically and collecting the data many times a day. The overhead is pretty minimal and avoids other issues.


PTC used to provide a license monitoring tool way back, that kepta permanent log of all usage, but I believe that disappeared with flexlm.


License usage is always overstated, especially with intermittent users as our licenses drop after 30 minutes, the way I have it set up. So every break in a user's usage usually indicates that they were not using it for a half hour already. When we had licenses set to the default timeout (2 hours) we constantly ran out of licenses and when I set it to 20 minutes (the minimum, if I recall), licenses were lost too easily and people would lose them in the middle of something they were doing. 30 minutes has proven to be our sweet spot.

In Reply to alfonso medina:


Hey this last one is exactly what I wanted to do with the data at the end
of the year or when licenses ran out. I'm glad I have an actual working
example of it. I think we should just have a nice place to put the code and
install instructions so others can use the same thing. So you used the Log
file for this one?

I set the log flag on all users and collect the logs separately The logs
give feedback as to how many users per day failed to grab a license of
what. But I haven't had time/chance to figure out a
graphical representation that would help in the getting more licenses
scenario. Its almost necessary to show it terms of money/opportunity loss.

This is what I came up with using some perl to process the logs and export
something in terms management can understand. I will be adding this to our
site as a management only view. Excel sucks at everything, even graphs so
that's why I asked my intern to use the google graph system - html 5 piece
of code. She figured that out quickly and get our little graph done. These
are excel:

[image: Inline image 2]

[image: Inline image 1]
note how one day we got licenses Smiley Happy then we got more users again....then
more licenses and we figured a license to user ration that works for our
dynamic. so our efficiency should have gone up.

when the users were fighting for licenses it was horrible. None got to work
on their project without getting interruptions.







On Fri, Mar 29, 2013 at 7:12 AM, Andrew Mansfield
@<->wrote:

> We use a perl script that I wrote about 10 years ago that strips the user,
> license and start and stop time information out of the log file and then
> pushes the data into a MySQL database. We look at the results on some web
> pages using php's GD image library. All the graphics are generated on the
> fly. The images that it creates are a bit dated looking. I haven't played
> around with any of it for years: it's simple & just works..
>
> It's not perfect but it gives us a consistent record of who uses what and
> when.
>
> We originally started recording login times back in the early 90's when
> our company bought a bunch of SGI unix workstations each with a seat of
> Pro/Engineer for $30-40k a pop and our CEO wanted to make sure we were
> using them after spending all that cash (even wanted 2 shifts, which was
> impractical and thankfully was never enforced).
>
> If anyone's interested in any of this, I'm happy to forward it along.
>
1-Visitor
March 29, 2013
I should add. every user launchers pro/e or X program requesting a license.
in the batch file, before this or after it, at your wish, you can copy the
previously created log from the users computer to a network drive. Its a
total workaround but I was left with no choice and PTC doesn't exactly help
sell its self enough around here. So I then collect these files using my
computer's program that makes the graphs. Its total nuts but I only do it
when in time of need anyway. That's why i want to get that stuff integrated
into an SQL database and then later at leisure create a command and graph
nice results from it. Hey I'm an admin and admins need to know stuff to do
stuff, so don't look at me with "you should have bought PTC's license
advantage 2000, the one with the cool management app and angry birds". For
my price and user size there is only Guesswork 2.0 available and we used to
always use it.


1-Visitor
March 29, 2013
The original license manager had an interesting shortcoming. It seemed
to depend on a mutual communication. The license server seemed satisfied
if it could communicate with the license holding machine, while the
licensed machine required an affirmative response from the server.
Because of this asymmetry it was possible for a workstation to 'lose' a
license while the license server remained unaware.

So, a user had a license until a request/response failed whether due to
license timeout on the server or network delay in getting the response.

Reset the server every few minutes and the magic happens.

The server is always is ready to issue a new license and the machines
get/renew a license whenever they make a request.

It was conjectured that a 5:1 ratio of active users to licenses could be
easily supported using this method.

That and the frequent frustration at 'losing' a license simply because
of network delays in the request/response are likely reasons for PTC
adopting flexlm.

Oh for the good old days.

"Hey I'm an admin and admins need to know stuff to do stuff." I like
that. Not all system administrators are as proactive.

Dave S.

April 1, 2013
I use a simple batch script running on a scheduled task every 15
minuntes. Doesn't tell me when a license request fails, but does give me
the number of users logged in with free/used licenses. Code is:

@echo off
setlocal EnableExtensions
TITLE Record PTC License Usage
COLOR a0

REM PTC Status Command
SET CMD="C:\Program Files\PTC\Creo Elements\Pro5.0\bin\ptcstatus.bat"
-nopause
REM File to write results too
SET FILE=".\LicenseData\PTCLicenseUseage.dat"

REM String to begin

DATE /T>>"%FILE%"
TIME /T>>"%FILE%"
call %CMD%|FINDSTR /X ".*PROE_FoundationAdv.......[0-9].*">>"%FILE%"

~Dan

6-Contributor
April 2, 2013

We've used JTB FlexReport, though it's been a while since I've done any active logging. It has a fairly good capability to track a wide range of licenses (anything running FLEXlm, FlexNet, Lum, etc.) It also has a decent graphical interface.

1-Visitor
April 2, 2013
Yeah this one looks good but the big problem is that they will not keep
track of failed attempts to gain a license, I think (correct me if I'm
wrong). It looks nice and usable otherwise. I'll post my code. I need to
cleanup the way it works anyway. It will take time though


6-Contributor
April 2, 2013

I looked in the documentation for JTB FlexReport and it does offer consolidated license denial reporting as well as email notification for denials if configured. I haven't used it this way, though. I'll try it out if I get a chance.

1-Visitor
April 2, 2013
That's pretty cool. I think denials are the No. 1 data you want if you need
to get more. You always get asked "well how many more?" Denial counting
gets you some clues as to how many more.

Actually while we are on this subject and since someone else mentioned
already... See we have this dumb idea that our ideal ratio is 2.9 users per
license. Well it seems to work for us, but then some guys from another
company gave us a presentation on some unrelated software and made mention
of the license settings. They say that if you set the time out to 5 minutes
or less, that your license availability becomes excellent, more than
doubling our current ratio.

That made sense to me because I know for example I can get busy or go to a
short meeting while using up a pro/e license that will stay with my
computer for half an hour. The other users will probably have similar
situations. Most of our engineers only go home to say hi to the kids and
see if the wife is still there. Otherwise they have their nose stuck in the
small crevices left open in what used to be walkable space in the labs. So
the little time they spend on pro/e, should be a blessing to the rest of us
cad monkeys who only know to extrude first and ask questions later. So does
setting that time out to 5 minutes work? Do you guys do this or similar at
your different companies?

Can we get a poll of how many minutes you guys have set your time out to. I
would be really interested, I think its always an eye opener when others do
things completely different and it works better.