Returns an array about Memory or IO infos of a running process.
ProcessGetStats ( ["process" [, type = 0]] )
|process||[optional] The name or PID of the process to get infos from. Default (-1) is the current process.|
$PROCESS_STATS_MEMORY (0) = (default) memory infos.
$PROCESS_STATS_IO (1) = IO infos.
Constants are defined in "AutoItConstants.au3".
|Success:||an array of infos data (See Remarks).|
|Failure:||sets the @error flag to non-zero.|
The array returned is mono-dimensional and is made up as follows:
Type = $PROCESS_STATS_MEMORY
$aArray = WorkingSetSize
$aArray = PeakWorkingSetSize
Type = $PROCESS_STATS_IO
$aArray = number of read operations performed.
$aArray = number of write operations performed.
$aArray = number of I/O operations performed, other than read and write operations.
$aArray = number of bytes read.
$aArray = number of bytes write.
$aArray = number of bytes transferred during operations other than read and write operations.
#include <MsgBoxConstants.au3> Example() Func Example() ; Retrieve memory details about the current process. Local $aMemory = ProcessGetStats() ; If $aMemory is an array then display the following details about the process. If IsArray($aMemory) Then MsgBox($MB_SYSTEMMODAL, "", "WorkingSetSize: " & $aMemory & @CRLF & _ "PeakWorkingSetSize: " & $aMemory) Else MsgBox($MB_SYSTEMMODAL, "", "An error occurred.") EndIf EndFunc ;==>Example