Kevin McGinn · Apr 14

Accessing %Monitor.System.License properties

I am writing a Python tools I want to access the %Monitor.System.License properties:

  1. AvailableDist
  2. AvailableLocal
  3. MaxUsedDist
  4. MaxUsedLocal
  5. CurrentUsedDist
  6. CurrentUsedLocal

Initially I want to develop Objectscript to verify access to the properties. But I can not figure the proper syntax.

I first attempted:

set ans = ##class(%Monitor.System.License).AvailableDist

which failed.

I tried another approach:

set ans = ##CLASS(%Monitor.System.License).%GetParameter("AvailableLocal")

which also failed. There is open method so it appears access options are limited. I am missing something about this class. I have not encountered such issues accessing other classes. Any help in either objectscript or Python form would be helpful.

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

In COS create an instance of the License class and run the GetSample method to fetch the current license info. You can then reference the properties directly.

set ans = ##class(%Monitor.System.License).%New()
set sc = ans.GetSample()
write ans.AvailableDist

Thank-you. Your suggestion works perfectly