Function Reference


ProcessGetStats

Returns an array about Memory or IO infos of a running process.

ProcessGetStats ( ["process" [, type]] )

Parameters

process [optional] The name or PID of the process to get infos from. Default (-1) is the current process.
type [optional] 0 = (default) memory infos, 1 = IO infos.

Return Value

Success: An array of infos data (See Remarks).
Failure: 0.

Remarks

The array returned is mono-dimensional and is made up as follows:

Type = 0 : Memory Stats

$array[0] = WorkingSetSize
$array[1] = PeakWorkingSetSize

Type = 1 : IO Stats

$array[0] = number of read operations performed.
$array[1] = number of write operations performed.
$array[2] = number of I/O operations performed, other than read and write operations.
$array[3] = number of bytes read.
$array[4] = number of bytes write.
$array[5] = number of bytes transferred during operations other than read and write operations.

Related

ProcessList

Example


; retrieve memory infos of the current running process
Local $mem = ProcessGetStats()

; retrieve IO infos of the current running process
Local $IO = ProcessGetStats(-1, 1)