Question
Kevin McGinn · Apr 15

Source object for connection information

When looking at the "Current License Usage Summary" web page, there is a line for both local and distributed "Maximum Connections". I have scrutinized every class that seems reasonable to contain this information but have found nothing that matches the values on the web page. I do not believe these are related to license specifically though I did review all of the potential attributes of the license related classes to no avail.

 

Product version: Caché 2018.1
0
0 205
Discussion (2)1
Log in or sign up to continue

I was able to resolve this issue by use the %Library.ResultSet' object '%New() method (python)

hdl = self.db.run_class_method('%Library.ResultSet',"%Library.ResultSet',%New",[])

The setting the class name and query to be executed:

        hdl.set("ClassName","%SYSTEM.License")
        hdl.set("QueryName","Summary")

This is then executed:

hdl.run_obj_method("%Execute",[])

The results are process in a while loop while the value of:

status = None

conStat=True


while conStat:
                lStat = hdl.run_obj_method("%Next",[status])

               if lStat:

                       < process results>

              conStat = lStat

There may be more elegent refinements to this python solution but this does accurate extract and return the license usage summary data

A more optimal processing loop:

where hdl.run_obj_method("%Next",[status]):

     <process results>