Home > Language Reference > System Functions > GetProcessCpuLoad

GetProcessCpuLoad

The GetProcessCpuLoad function returns the percentage CPU load for the specified process.

Syntax

var = GetProcessCpuLoad(<process_name> [, <instance_number>)

Parameters

<process_name>, string, name of the process to measure.

<instance_number>, optional integer. It specifies the instance number of the process to measure if multiple instances of the process are running.

Return value

var, integer, percentage CPU load from 0 to 100. If the function fails, the return value is a negative nonzero value (see System Functions Error Codes).

See also

GetCpuLoad

Examples

a=GetProcessCpuLoad("TASKEXEC.EXE")