Skip to main content
Version: 20 R7 BETA

Process info

History
ReleaseChanges
20 R7Added

Process info ( processNumber : Integer ) : Object

ParameterTypeDescription
processNumberIntegerProcess number
ResultObjectInformation about the process

Description

The Process info command returns an object providing detailed information about process whose number you pass in processNumber. If you pass an incorrect process number, the command returns a null object.

The returned object contains the following properties:

PropertyTypeDescription
cpuTimeRealRunning time (seconds)
cpuUsageRealPercentage of time devoted to this process (between 0 and 1)
creationDateTimeText (Date ISO 8601)Date and time of process creation
IDIntegerProcess unique ID
nameTextProcess name
numberIntegerProcess number
preemptiveBooleanTrue if run preemptive, false otherwise
sessionIDTextSession UUID
stateIntegerCurrent status. Possible values: see below
systemIDTextID for the user process, 4D process or spare process
typeIntegerRunning process type. Possible values: see below
visibleBooleanTrue if visible, false otherwise
  • Possible values for "state":
ConstantValue
Does not exist-100
Aborted-1
Executing0
Delayed1
Waiting for user event2
Waiting for input output3
Waiting for internal flag4
Paused5
  • Possible values for "type":
ConstantValue
Apple event manager-7
Backup process-19
Cache manager-4
Client manager process-31
Compiler process-29
Created from execution dialog3
Created from menu command2
DB4D Cron-49
DB4D Flush cache-46
DB4D Garbage collector-47
DB4D Index builder-45
DB4D Listener-51
DB4D Mirror-50
DB4D Worker pool user-48
Design process-2
Event manager-8
Execute on client process-14
Execute on server process1
External task-9
HTTP Listener-56
HTTP Log flusher-58
HTTP Worker pool server-55
Indexing process-5
Internal 4D server process-18
Internal timer process-25
Log file process-20
Logger process-57
Main 4D process-39
Main process-1
Method editor macro process-17
Monitor process-26
MSC process-22
None0
On exit process-16
Other 4D process-10
Other internal process-40
Other user process4
Restore Process-21
Serial Port Manager-6
Server interface process-15
ServerNet Listener-43
ServerNet Session manager-44
SOAP process-33
SQL Listener-54
SQL Method execution process-24
SQL Net Session manager-53
SQL Worker pool server-52
Web process on 4D remote-12
Web process with no context-3
Web server process-13
Web server spare process-32
Worker pool in use-41
Worker pool spare-42
Worker process5
note

4D's internal processes have a negative type value and processes generated by the user have a positive value. Worker processes launched by user have type 5.

Here is an example of output object:


{
"number": 4,
"name": "Application process",
"sessionID": "3C81A8D7AFE64C2E9CCFFCDC35DC52F5",
"ID": 4,
"visible": true,
"type": -18,
"state": 0,
"creationDateTime": "2024-09-22T12:46:39.787Z",
"preemptive": false,
"systemID": "123145476132864",
"cpuUsage": 0,
"cpuTime": 0.006769
}

Example

You want to know if the process is preemptive:


var $preemptive : Boolean
$preemptive:=Process info(Current process).preemptive


See also

Count tasks
Process activity
Process state
Session info