4D v15

GET ACTIVITY SNAPSHOT

Home

 
4D v15
GET ACTIVITY SNAPSHOT

GET ACTIVITY SNAPSHOT  


 

 

GET ACTIVITY SNAPSHOT ( arrActivities | arrUUID ; arrStart ; arrDuration ; arrInfo {; arrDetails}{; *} )

ParameterTypeDescription
arrActivities | arrUUIDObject array, Text array<-Complete description of operations (object array) or
Operation UUIDs (text array)     
arrStartText array<-Operation start times     
arrDurationLongint array<-Operation durations in seconds     
arrInfoText array<-Description     
arrDetailsObject array<-Context details and sub-operations (if any)
*Operator->If passed = Get server activity

Originally introduced in 4D v14 R3

This command returns additional information, in relation to the evolution of the Real Time Monitor (RTM) page of the 4D Server administration window (see Real Time Monitoring page).

The additional information is returned in two new properties: dbContextInfo and dbOperationDetails. These properties are available for both syntaxes.

With this syntax, the new properties are available at the first level of the arrActivities object:

[
    {
        "message":"xxx",
        "maxValue":12321,
        "currentValue":63212,
        "interruptible:0,
        "remote":0,
        "uuid":"deadbeef",
        "taskId":xxx,
        "startTime":"2014-03-20 13:37:00:123",
        "duration":92132,
        "dbContextInfo":{
            "task_id": xxx,
            "user_name": myName,
            "host_name": HAL,
            "task_name": "CreateIndexLocal",
            "client_uid": "DE4DB33F33F"
            "user4d_id ": 1,
            "client_version ": 123456
        },
        "dbOperationDetails":{
            table: "myTable"
            field: "Field_1"
        },

        "subOperations":[...]
    },...
]

With this syntax, the new properties are available in the last parameter, renamed arrDetails for clarification. The structure of this array is now:

[
    {
        "dbContextInfo":{...} //see below
        "dbOperationDetails":{...} //see below
        "subOperations":[...]
    },...
]

dbContextInfo

This property is an object which holds information when an operation is handled by the database engine. It has the following properties:

  • host_name (string): name of the host that started the operation
  • user_name (string): name of the 4D user whose session started the operation
  • task_name (string): name of the process which started the operation
  • task_id (number): ID of the process which started the operation
  • client_uid (string): optional, UUID of the client which started the operation
  • is_remote_context (Boolean, 0 or 1): optional, indicates if a database operation was started by a client (value 1) or by the server through a stored procedure (value 0)
  • user4d_id (number): ID of the current 4D user on the client side
  • client_version (string): four digits representing the 4D engine version that the application is based on, as returned by the Application version command.

client_uid and is_remote_context are only available in a client/server environment. client_uid is returned only if a database operation has been initiated from the client side.

dbOperationDetails

This property is returned only if the operation uses the database engine (this is the case for queries and/or sorts, for example). It is an object that defines specific activity information. The properties returned depend on the database operation being executed. They include, for example:

  • table (string): name of the table involved in the operation
  • field (string): name of the field involved in the operation
  • queryPlan (string): internal plan for the query
  • etc.

 
PROPERTIES 

Product: 4D
Theme: Language

 
HISTORY 

 
ARTICLE USAGE

4D v15 - Upgrade (standard edition) ( 4D v15)