Rechercher

Question
· Juin 13, 2024

Python interaction with Config.config class not returning gmheap size

I am trying to extract GMHeap, Locksiz values form Config.config using python (imported irisnative for Python) but the below python progam is not returning any value. Please suggest if i am doing any mistake - 

Also, plese suggest how i can set values for GMHeap and Locksiz to a different value through Python.

 

 

import irisnative

hostname = "127.0.0.1"
port = 1972
namespace = "%SYS" #change the namespace based on situation
username = "_SYSTEM"
password = "xxxxxxxx"
connection = irisnative.createConnection(hostname, port, namespace, username, password)
dbnative = irisnative.createIris(connection)

gmheap_size=dbnative.classMethodValue("Config.config", "gmheap")
print(gmheap_size)

connection.close()

9 Comments
Discussion (9)2
Connectez-vous ou inscrivez-vous pour continuer
Discussion
· Juin 13, 2024

$ZTRAP vs Try/Throw/Catch

I'm scraping my way through some code that's been around for a while, and came across the use of $ZTRAP and (dear GOD) GOTO for trapping and handling errors.

In an effort to "modernize" it and make it, I don't know, less M-ish (sorry old-timers!), I'm replacing it with Try/Catch blocks.

Some questions:

  1. Is this a dumb idea?
  2. Anything I should look out for?
  3. Did I hurt anyone's feelings?

And if the answer to number 3 is Yes, my deepest apologies ... I love you guys! 🤩

5 Comments
Discussion (5)3
Connectez-vous ou inscrivez-vous pour continuer
Article
· Juin 13, 2024 4m de lecture

How to check the size of your data

InterSystems FAQ rubric

Data for InterSystems products (table row data, object instance data) is stored in global variables.
The data size of each global can be obtained by clicking the properties of the global you want to view from the Management Portal > System > Configuration > Local Database > Globals page, and then clicking the Calculate Size button on the Global Attributes page that appears.
To display the data sizes of globals in a namespace, you can call ^%GSIZE utility on the terminal.
The method of execution is as follows.

USER>do ^%GSIZE
 
Directory name: c:\intersystems\ensemble\mgr\user\ =>
All Globals? No => Yes
^DeepSee.ActiveTasks contains no data
Include it anyway? No => Y
Include any other similar globals without asking again? Yes =>
^DeepSee.ActiveTasks contains no data
Include it anyway? No => Yes
Include any other similar globals without asking again? Yes => Yes
^DeepSee.FeatureStats contains no data -- included
^DeepSee.Session contains no data -- included
^oddBIND     contains no data -- included
^oddMETA     contains no data -- included
^oddStudioDocument contains no data -- included
^oddStudioMenu contains no data -- included
^rINCSAVE    contains no data -- included
91 items selected from
91 available globals
Show details?? No => Yes
Device:
Right margin: 80 =>
directory: c:\intersystems\ensemble\mgr\user\                                   Page: 1                           GLOBAL SIZE                        26 Jun 2017
                                                                         6:56 PM
      Global        Blocks       Bytes Used  Packing   Contig.
      --------    --------  ---------------  -------   -------
      CacheMsg           1            3,812     47 %         0
      DeepSee.ActiveTasks
                         1               24      0 %         0
      DeepSee.AgentLog
                         1            6,008     74 %         0
      DeepSee.Agents
                         1              688      8 %         0
      DeepSee.BucketList
                         1               76      1 %         0
      DeepSee.Cache.Axis
                        25          142,616     70 %        14
      DeepSee.Cache.Listing
                        15           87,728     72 %        11
      DeepSee.Cache.Results
                        31          183,200     72 %        17
      DeepSee.Cubes
                         3           17,936     73 %         0
                                         to continue or '^' to STOP:
2 Comments
Discussion (2)2
Connectez-vous ou inscrivez-vous pour continuer
Question
· Juin 13, 2024

DateTime from yyyy-mm-dd hh:mm:ss.000 to yyyymmdd

how do I convert DateTime from yyyy-mm-dd hh:mm:ss.000 to yyyymmdd

5 Comments
Discussion (5)2
Connectez-vous ou inscrivez-vous pour continuer
Question
· Juin 13, 2024

Include CSP in CLS.

Is there any way to include a CSP page within a CLS?
Example: #Include file.csp 

Context: I work with a legacy that most screens are built using only CLS. I'm trying to change this by separating the frontend layers to be built only with CSP and backend layers using CLS. I improvised a method that injects an iframe to render the CSP in CLS through that iframe, but I'm still not happy. I need to know if there is any way to include this CSP using some specific resource for this.

15 Comments
Discussion (15)3
Connectez-vous ou inscrivez-vous pour continuer