processInfo
processInfo ( processNumber : integer ) : object
Parameter | Type | Description | |
---|---|---|---|
processNumber | integer | -> | Process number |
Result | object | <- | Information about the process |
Description
The processInfo
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:
Property | Type | Description |
---|---|---|
cpuTime | number | Running time (seconds) |
cpuUsage | number | Percentage of time devoted to this process (between 0 and 1) |
creationDateTime | string (Date ISO 8601) | Date and time of process creation |
ID | integer | Process unique ID |
name | string | Process name |
number | integer | Process number |
preemptive | boolean | True if run preemptive, false otherwise |
sessionID | string | Session UUID |
state | integer | Current status. Possible values: see below |
systemID | string | ID for the user process, application process or spare process |
type | integer | Running process type. Possible values: see below |
visible | boolean | True if visible, false otherwise |
- Possible values for "state":
Constant | Value |
---|---|
kAborted | -1 |
kDelayed | 1 |
kDoesNotExist | -100 |
kExecuting | 0 |
kPaused | 5 |
kWaitingForInputOutput | 3 |
kWaitingForInternalFlag | 4 |
kWaitingForUserEvent | 2 |
- Possible values for "type":
Constant | Value |
---|---|
kBackupProcess | -19 |
kCacheManager | -4 |
kClientManagerProcess | -31 |
kCompilerProcess | -29 |
kDesignProcess | -2 |
kEventManager | -8 |
kHTTPLogFlusher | -58 |
kIndexingProcess | -5 |
kInternalProcess | -18 |
kInternalTimerProcess | -25 |
kLogFileProcess | -20 |
kMainProcess | -39 |
kMonitorProcess | -26 |
kNone | 0 |
kOnExitProcess | -16 |
kOtherProcess | -10 |
kOtherUserProcess | 4 |
kWebProcessWithNoContext | -3 |
kWebServerProcess | -13 |
kWorkerProcess | 5 |
note
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 = processInfo(currentProcess).preemptive