Question Kevin McGinn · Sep 19, 2022 Python method; issues with status returned from run_class_method In my Python script I import intersys2.pythonbind3 to create the connection and define a database object as db I execute the method res = self.db.run_class_method("%Library.GlobalEdit", "GetGlobalSize",[<db>, allocated,used]) This executes correctly as I loop through a list of databases. #Python #Caché 0 5 0 107
Question Kevin McGinn · May 31, 2022 System impact of compacting to reclaim large space I have a database with almost 1T of free space. I want to run the compaction process to reclaim and subsequently free that space. I am aware that this process is a background process but will the level of processing required to move this volume of space to the end of the file to allow for reclamation impact system usage while this process is running. Essentially, does this process run at a low priority and use processing as available. I am trying to determine if I should run this over a weekend or can this be run at any time. #Caché 0 2 0 137
Question Kevin McGinn · Apr 26, 2022 COS script for getting users from Security.Users is returning an empty result I wrote this COS script that I can run in a terminal session to get a view of the cache users: set hdl = ##class(%Library.ResultSet).%New()set hdl.ClassName = "Security.Users"set hdl.QueryName = "Detail"set sc = hdl.Execute() while hdl.%Next() { do hdl.%Print() } #ObjectScript #Caché 0 4 0 124
Question Kevin McGinn · Apr 15, 2022 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. #Python #Caché 0 2 0 236
Question Kevin McGinn · Apr 14, 2022 Accessing %Monitor.System.License properties I am writing a Python tools I want to access the %Monitor.System.License properties: AvailableDist AvailableLocal MaxUsedDist MaxUsedLocal CurrentUsedDist 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") #ObjectScript #Python #Caché 0 2 0 189
Question Kevin McGinn · Mar 21, 2022 Need help converting from objectscript query into Python query I have the object query: s Rset=##class(%ResultSet).%New("%SYSTEM.License.UserListAll") I can loop through that query and it generates the report information that I need. I have a Python process where I use the intersys import to connect to the Cache instance. But I have been unable to determine the correct syntax in Python for this query. Being that 'UserListAll' is a query I attempted to user: res = <query>.prepare("select * from %SYSTEM.License_UserListAll") #Python #Caché 0 2 0 228
Question Kevin McGinn · Mar 15, 2022 Running python process with intersys.pythonbind3 import from remote site I have developed a process that pulls data elements from a cache instance using the tools provided with the "intersys.pythonbind3" import. This is a windows box. After validating the process, the next step is to install the process on a site (Windows) that does not have an installed version of cache and access the cache instance remotely. But, since intersys.pythonbind3 is part of the cache install, I am not sure what to do to allow this process to function because of the missing import. #Python #Caché 0 1 0 195
Question Kevin McGinn · Mar 10, 2022 Python - create report with License usage data I am in the process of creating a python report writer that includes the information contained in "License Usage" page of the management portal. I think I have a handle on the local values contained in the report using the %SYSTEM.License class I have those defined using these methods: Current License Units Used - -> LUConsumed Maximum License Units Used --> LUMaxConsumed License Units Enforced --> KeyEnforcedUnits License Units Authorized --> KeyLicenseUnits #Python #Caché 0 5 0 228
Question Kevin McGinn · Mar 9, 2022 Python script to perform $ZDATE function I have a python script that is pulling the cache instance key expiration date ( KeyExpirationDate() ) which comes back as an integer. With the queryscript function - $ZDATE(73284) I can derive the actual expiration date. Is there a manner or method of creating an equivalent Python script that will convert the integer return by the KeyExpirationDate() method into a date string? #Python #Caché 0 1 1 181
Question Kevin McGinn · Mar 4, 2022 I need the status values of databases of a 2017.1.xx cache instance I am using the import intersys.pythonbind3 as pyb conn = pyb.connection()conn.connect_now(...)db = pyb.database(conn)qry = pyb.query(db)obj = pyb.object(db) for connection to the cache instance However when I run this class method, The error message indicates the method does not exist: print(db.run_class_method("SYS.Database","GetStatus",[])) #Databases #Caché 0 3 0 103