Daniel Natali · Apr 19, 2021

Accessing another process's object variables properties like %session and %request.

Hi Community,

I am trying to access another process's content of objects like %request and %session. I am using the class/method "%SYS.ProcessQuery:VariableByPid". Does anyone knows how to get the value of the properties like %request.Data("ID",1)  from one process that is running on the DB server?

Example of what I am trying to do:

        set rs=##class(%ResultSet).%New("%SYS.ProcessQuery:VariableByPid")
        set tsc=rs.Execute(ProcessID,"%request")
        while rs.%Next() { 
            w "Name:"_$g(rs.Data("Name")),!
             w "Value:"_$g(rs.Data("Value")),!
        do rs.Close()



I just can see the object reference 1@%CSP.Request, I am not sure if we have a way to check the object properties.

Kind Regards,


Product version: Caché 2017.1
$ZV: Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2017.2.2 (Build 865_3_20144U) Mon Aug 17 2020 13:28:18 EDT
0 218
Discussion (3)1
Log in or sign up to continue

Hi Eduard,

I need to investigate system performance issues and I am planning to log useful information about the process that are inside the array Data of %request and %session objects. Things like user name, Id's and etc.

I hope it makes sense.

Kind Regards,