New post

Encontrar

Article
· 2 hr ago 2m read

如何定位临时global在IRISTEMP数据库中占用的空间

当进程中的数据不需要持久化保存,但又需要用到global的高性能特性时,我们常常将数据保存在临时global中,也就是保存在IRISTEMP/CACHETEMP数据库中。

系统使用 IRISTEMP/CACHETEMP 数据库保存临时的数据,用户也可以进行同样的操作。

关于临时global以及IRISTEMP数据库的更多内容,可以参见文档 Temporary Globals and the IRISTEMP Database

以下情况global作为临时使用:

  1. 系统临时global (^IRIS.Temp*, ^%cspSession, ^CacheTemp*, ^Mtemp*, 等)
  2. 用户定义的 globals 映射至 IRISTEMP/CACHETEMP 
  3. 处理私有globals (^||name, ^|"^"|name, ^["^"]name,^["^",""]name,等)
  4. GLOBAL TEMPORARY 表

1和2的大小可以通过使用 ^%GSIZE 获取

USER>do ^%GSIZE
Directory name: c:\intersystems\iris\mgr\user\ => c:\intersystems\iris\mgr\iristemp\
                            // 指明iristemp 数据库的位置
All Globals? No => yes       // Yes 为显示所有globals: 34 项被选中
34 available globals
Show details?? No => No   //  No 为不显示更多信息 
Device:
Right margin: 80 =>
:

3和4  进程私有global 可以通过使用 ^GETPPGINFO 查看。

更多关于 ^GETPPGINFO 的信息请查阅文档 这里

下面的例子列出了当前进程下所有的私有globals:

 set ^||flintstones(1)="Fred"
 set ^||flintstones(2)="Wilma"
 znspace "%SYS"
 do ^GETPPGINFO("*")

另一个方法用于输出单个进程使用较大数量的私有global:

 set ns=$namespace
 znspace "%SYS"
 // Only processes with more PPG blocks than the total number of processes are included
 set st=##class(%SQL.Statement).%New()
 set status=st.%PrepareClassQuery("%SYS.ProcessQuery","AllFields")
 set rs=st.%Execute()
 while rs.%Next() {
    set pid=rs.%Get("Pid") // Process ID
    set cnt=rs.%Get("PrivateGlobalBlockCount") // Number of PPG blocks
    // When the number of PPG blocks per process is 0 or more, the contents are output (the following example shows 20 or more blocks).
    if cnt > 20 {
       set rs2=##class(%ResultSet).%New("%SYS.ProcessQuery:PPG")
       // "N" Do not return subscripts of a PPG, just return the root name
       // "B" Return the number of blocks used by the PPG (needs the "N" option)
       do rs2.Execute("*",pid,"NB")
       for {
          quit:'rs2.Next()
          write cnt_" PID:"_pid_", PPG name "_rs2.GetData(1)_" is using "_rs2.GetData(3)_" disc blocks",!
       }
    }
 }
 
 znspace ns
Discussion (0)1
Log in or sign up to continue
Question
· 2 hr ago

Airportsterminalsme

 

The terminal guides on Airportsterminalsme.com are incredibly detailed, which is exactly what I need when I’m in a rush or feeling a bit lost. They break down each airport terminal, showing where check-in counters, security checkpoints, and gates are located. There’s even info on transport options like airport shuttles, taxis, and public transport, which is a lifesaver when you’re trying to figure out how to get to your hotel after a long flight. One of my favorite features is the airport lounge information. As someone who values a bit of peace and quiet before a flight, knowing where to find a good lounge makes all the difference.

Discussion (0)1
Log in or sign up to continue
Digest
· 3 hr ago

Nuevas publicaciones en la Comunidad de InterSystems, 26 agosto - 1 septiembre

26 agosto - 1 septiembreWeek at a GlanceInterSystems Developer Community
Article
· 3 hr ago 1m read

Cómo descargar un archivo de imagen de un servidor web utilizando el lenguaje ObjectScript

[FAQ] Preguntas frecuentes de InterSystems

El siguiente código descarga https://www.intersystems.com/assets/intersystems-logo.png y guarda el archivo como c:\temp\test.png.

Es necesario definir una configuración SSL llamada SSLTEST antes de ejecutar este código.

 

ClassMethod download() As %Status
{
    Set sc = $$$OK
    Set httprequest=##class(%Net.HttpRequest).%New()
    set httprequest.Port = 443
    set httprequest.Https = 1
    set httprequest.SSLConfiguration = "SSLTEST"
    Set httprequest.Server="www.intersystems.com"
    Do httprequest.Get("/assets/intersystems-logo.png")
    Set httpresponse=httprequest.HttpResponse
    Set file=##class(%File).%New("c:\temp\test.png")
    Do file.Open("NWUK\BIN\")
    Do file.CopyFrom(httpresponse.Data)
    Do file.Close()
    Return sc
}
Discussion (0)1
Log in or sign up to continue
Article
· 3 hr ago 1m read

Helm Uninstall InterSystems - What does it do?

Say I want to uninstall the IKO - all I need to do is:

> helm uninstall intersystems

What happens behind the scenes is that helm will uninstall what was installed when you ran :

> helm install intersystems <relative/path/to/iris-operator>

In some sense - this is symmetric to when we ran install - however with a different image.

You'll notice that when you install, it knows what image to take from:

operator:
  registry: containers.intersystems.com
  repository: intersystems/iris-operator-amd
  tag: 3.7.13.100

For uninstall the image to take note of is:

cleaner:
  registry: appscode
  repository: kubectl
  tag: v1.14

as referenced in your values.yaml.

Some clients have had trouble uninstalling when their cluster is not connected to the internet, because this image is missing from their registry. What occurs then, is that we have to go and delete the objects that were created via the templates folder, referenced here, and these two secrets:

intersystems-iris-operator-amd-apiserver-cert
sh.helm.release.v1.intersystems.v1

To avoid this just push the cleaner image to your repository. You can find the newest image here (make sure to push the image you reference in values.yaml).

Hope this helps!

Discussion (0)1
Log in or sign up to continue