This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
Get Monitored Activity
|
Get Monitored Activity -> Function result | ||||||||
Parameter | Type | Description | ||||||
Function result | Collection |
![]() |
Collection of monitored activities | |||||
The Get Monitored Activity command returns a collection of objects describing operations recorded according to the specifications set by the START MONITORING ACTIVITY command. It can be called and executed on 4D remote, 4D Server, and 4D standalone applications (if source isn't from network activity).
The objects in the returned collection have the following properties:
Property | Type | Description | ||||||||||||
activityKind | Longint | The type of recorded activity:
| ||||||||||||
activityDuration | Real | The duration of the activity expressed in seconds | ||||||||||||
activityData | Object | Object(s) containing specific properties depending on the type of recorded activity (activityKind). In some circumstances, several objects can be returned for the same operation. In this case, the objects will have the same UUID. The additional properties in these objects are described in the sections below. |
Note: The activityData object uses the information defined by the SET DATABASE PARAMETER command for the 4DDebugLog.txt (standard) (if any), otherwise it uses a default mode. Starting log recording during execution of the Get Monitored Activity command will thus impact the returned results.
activityData object:
Property | Type | Description |
sequenceNumber | longint | Unique and sequential operation number in the logging session. |
elapsedTime | longint | Elapsed time since the debug log was started (expressed in milliseconds) |
processID | longint | Process ID |
uniqueProcessID | longint | Unique process ID |
stackLevel | longint | Stack level |
duration | longint | Length of time for operation (expressed in microseconds) |
kind | text | The kind of operation logged. Possible values:
|
The following additional properties are returned in the activityData object according to the kind of operation:
Property | Type | Kind | Description |
commandName | text | command | Command name |
commandNumber | longint | command | Command number |
connectionUUID | text | task | Client machine UUID |
formEvent | text | command | Name of the form event |
formMethod | text | command | Form method |
functionName | text | member | Name of the ORDA member method |
memberMethod | text | command | Localized string of the member method for 4D's object call |
method | text | command | Localized names of 4D commands and functions |
parameters | text | command member message method pluginCommand pluginEvent task | Parameters passed in the operation |
pluginCommandName | text | pluginCommand pluginEvent | Name of the plug-in command |
pluginCommandNumber | longint | pluginCommand pluginEvent pluginMessage | Number of the plug-in command |
pluginExternalCall | longint | pluginCallback | Plug-in SDK entry point call |
pluginMessageName | text | pluginMessage | Possible values:
|
pluginName | text | pluginCallback pluginCommand pluginEvent pluginMessage | Name of the plug-in |
Notes:
activityData object:
Property | Type | Description |
sequenceNumber | longint | Unique and sequential operation number in the logging session |
time | text | Date and time in ISO 8601 format ("YYYY-MM-DDTHH:MM:SS.sss") |
systemID | text | System ID |
component | text | Component signature (e.g., 4SQLS or dbmg) |
processInfoIndex | longint | Corresponds to the "index" field in 4DRequestsLog_ProcessInfo.txt log, and permits linking a request to a process |
request | longint | Request ID for c/s messages, SQL requests, or LOG EVENT messages |
bytesIn | longint | Number of bytes received |
bytesOut | longint | Number of bytes sent |
execDuration | longint | Depending on where generated:
|
writeDuration | longint | Time taken in microseconds for sending the:
|
serverDuration | longint | Time in microseconds for the client/server communication |
taskKind | text | Preemptive or cooperative (respectively 'p' or 'c') |
rtt | longint | Time estimate in microseconds for the client to send the request and the server to acknowledge it.
|
Note: The activityData object is similar to the one returned by the GET ACTIVITY SNAPSHOT command, except that it only thresholded and finished operations are returned.
activityData object:
Property | Type | Description | |
message | text | Description of the operation | |
maxValue | longint | Maximum number of iterations for the operation (value=-1 for non-iterative operations) | |
remote | boolean | Client / server operation. Possible values: true, false | |
uuid | text | UUID of the operation | |
taskId | longint | Internal 4D identifier for the originating process | |
startTime | text | Start time of the operation in ISO 8601 format ("YYYY-MM-DDTHH:MM:SS.sss") | |
duration | longint | Total time (expressed in milliseconds) of operation execution | |
title | text | Additional information about the operation | |
extraInfo | object | Additional SQL information (if any):
| |
dbContextInfo | object | Context information of the operation | |
host_name | text | Name of the host that launched the operation | |
user_name | text | Name of 4D user whose session launched the operation | |
task_name | text | Name of the process that launched the operation | |
task_id | longint | ID of the process that launched the operation | |
client_uid | text | (c/s operations only) UUID of the client machine that launched the database operation | |
is_remote_context | longint | (c/s operations only) Indicates if operation was launced by the server via a stored procedure (value=0) or by a client (value=1) | |
user4d_id | longint | ID of the 4D user on the client machine | |
user4d_alias | text | Alias set for the 4D user. See SET USER ALIAS | |
client_version | text | Encoded string value that expresses the version number of the 4D environment returned by the Application version command | |
dbOperationDetails | object | Information about operation calls to the database engine | |
table | text | Name of the table in the operation | |
field | text | Name of the table field in the operation | |
queryPlan | text | Query plan for the operation | |
operationType | text | Type of operation | |
sortParameters | collection | Sort criteria | |
subOperations | collection | collection of activytData objects containing information about subordinate operations within the current operation. | |
[ ].message | text | Label of operations | |
[ ].maxValue | longint | Maximum number of iterations for the operation (value=-1 for non-iterative operations) | |
[ ].remote | boolean | Client / server operation (0=true, 1=false) | |
[ ].uuid | text | UUID of the operation | |
[ ].taskId | longint | Internal 4D identifier for the originating process | |
[ ].startTime | text | Start time of the operation in ISO 8601 format ("YYYY-MM-DDTHH:MM:SS.sss") | |
[ ].duration | longint | Total time (expressed in milliseconds) of operation execution | |
[ ].title | text | Additional information about the operation | |
[ ].extraInfo | object | Additional SQL information (if any):
|
See example for START MONITORING ACTIVITY
Product: 4D
Theme: Tools
Number:
1713
Created: 4D v18 R3
4D Language Reference ( 4D v20 R7)