Skip to main content

processProperties

processProperties ( process : integer , procName : string , procState : integer , procTime : integer )
processProperties ( process : integer , procName : string , procState : integer , procTime : integer , procMode : boolean )
processProperties ( process : integer , procName : string , procState : integer , procTime : integer , procMode : boolean , uniqueID : integer )
processProperties ( process : integer , procName : string , procState : integer , procTime : integer , procMode : boolean , uniqueID : integer , origin : integer )

ParameterTypeDescription
processinteger->Process number
procNamestring<-Process name
procStateinteger<-Process state
procTimeinteger<-Cumulative time taken by process in ticks
procModeboolean<-Visible (True) or Hidden (False)
uniqueIDinteger<-Unique process ID
origininteger<-Origin of the process

Description

The processProperties command returns various information about the process whose process number you pass in process.

If the process does not exist, which means you did not pass in process a number in the range 1 to highestProcessNumber, processProperties leaves the variable parameters unchanged.

After the call:

  • procName returns the name of the process. If the process was started by the Web server, its name is "Web Process#" followed by an UUID. If the process has been aborted (and its “slot” not reused yet), the name of the process is still returned. To detect if a process is aborted, test procState = -1 (see below).
  • procState returns the state of the process at the moment of the call. This parameter can return one of the values provided by the following constants:
ConstantValue
kAborted-1
kDelayed1
kDoesNotExist-100
kExecuting0
kPaused5
kWaitingForInputOutput3
kWaitingForInternalFlag4
kWaitingForUserEvent2
  • procTime returns the cumulative time that the process has used since it started, in ticks (1/60th of a second).
  • The optional procMode parameter returns true if the process is visible and false if it is hidden.
  • uniqueID, if specified, returns the unique process number. Actually, each process has attributed a process number to it as well as a unique process number per session. The unique number allows you to differentiate between two processes or two process sessions. It corresponds to the process number having been started during Qodly's session.
  • origin, if specified, returns a value that describes the origin of the process. This parameter can return one of the values provided by the following constants:
ConstantValue
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
kNone0
kOnExitProcess-16
kOtherProcess-10
kOtherUserProcess4
kWebProcessWithNoContext-3
kWebServerProcess-13
kWorkerProcess5

Example

The following example returns the name, state, and time taken in the variables vName, vState, and vTimeSpent for the current process:

 var vName : string
var vState,vTimeSpent : integer
processProperties(currentProcess,vName,vState,vTimeSpent)

See also

getProcessActivity
highestProcessNumber