Operating System - OpenVMS
1828006 Members
2276 Online
109973 Solutions
New Discussion

Is there a documented LMF interface?

 
SOLVED
Go to solution
David B Sneddon
Honored Contributor

Is there a documented LMF interface?

Background: we use LMF within our product to limit customer access via an N-user license.
One customer would like the ability to be notified once their license usage gets to a predefined value less than the limit (e.g. when there are only 5 licenses left).
Question: is there a documented API to access the information displayed via the SHOW LICENSE/UASGE command? I suspect there is not but I thought I would ask the question anyway.
We already have code to do notification when the
current attempt to use the product exceeds the license limit but this one customer wants more. I can parse the output of the SHOW LICENSE command but don't like doing this kind of thing (for obvious reasons).

Regards
Dave
7 REPLIES 7
labadie_1
Honored Contributor

Re: Is there a documented LMF interface?

Hello

I do not know if there is a documented or undocumented Api for LMF.

I think there must be a better way than parsing sh lic/usage, I will do some tests before posting more.

Regards

Gerard
Willem Grooters
Honored Contributor

Re: Is there a documented LMF interface?

No officially documented ones, it seems.

Not much help perhaps, but if you take a look into SYS$SHARE:SYS$STARLET_C.TLB and SYS$SHARE:SYS$LIB_C.TLB you will find LMFDEF and LMFITMDEF respectively. In these header files you may find some information on the structures involved. I would expect that somewhere in memory (no doubt addressed by some system symbol) you can access this data and then find out what you want.

HTH (to start with)

Willem
Willem Grooters
OpenVMS Developer & System Manager
Antoniov.
Honored Contributor

Re: Is there a documented LMF interface?

Try a search in openvms news group at
http://www.openvms.org/

Bye
Antoniov
Antonio Maria Vigliotti
Ian Miller.
Honored Contributor

Re: Is there a documented LMF interface?

The API is documented (LMF$GRANT_LICENSE and LMF$RELEASE_LICENSE)in a document available from the DSPP web site. If you have access search there. From a quick look I don't see how to do what you ask.
____________________
Purely Personal Opinion
John Gillings
Honored Contributor
Solution

Re: Is there a documented LMF interface?

Dave,

*UNDOCUMENTED*, might not work into the future, and may be tricky to get right in a cluster...

Your PAK must be activity based, in which case usage is tracked using locks. The resource name will be something like "LMF$D_". Each use will be represented by a NL mode lock in the granted queue.

So, you should be able to cook something up using $GETLKI. Use SDA to see what's happening as you grant and release.

Another (very kludgy!) way to check is attempt to GRANT yourself N times, then RELEASE. If you use an application defined lock around your call to LMF$GRANT_LICENSE you can avoid the potential timing windows with real client GRANT's.
A crucible of informative mistakes
David B Sneddon
Honored Contributor

Re: Is there a documented LMF interface?

Thanks to all who responded.
John, with the lock data and the logical in lmf$license_table this should be enough.

They will be made aware that it is UNDOCUMENTED and UNSUPPORTED.

Thanks again to all

Dave.
David B Sneddon
Honored Contributor

Re: Is there a documented LMF interface?

Just doing some housekeeping.
I have a solution to this issue and if anyone
is interested in the code, you know where to
contact me...

Dave