ePages 6.11.0 - DE_EPAGES/Core/API/Process.pm

Package DE_EPAGES::Core::API::Process

API functions for working with processes

@EXPORT_OK
GetProcessMemory
GetCurrentProcessID
SetProcessPriority

Functions

GetCurrentProcessID
GetProcessMemory
SetProcessPriority

GetCurrentProcessID

Returns the process id of the current process.

Syntax
$ProcessID = GetCurrentProcessID();
Return
$ProcessID (integer)
process id

GetProcessMemory

Returns the amount of memory used by a process.

Syntax
$MemSize = GetProcessMemory( $ProcessID );
Example
print GetProcessMemory( GetCurrentProcessID() ) . " bytes used by this process";
Input
$ProcessID (integer)
process id
Return
$MemSize (integer)
amount of memory used in bytes

SetProcessPriority

Sets the Priority of a process.

Syntax
SetProcessPriority( $ProcessID, $Priority )
Example
SetProcessPriority( GetCurrentProcessID(), 'ABOVE_NORMAL' );
Input
$ProcessID (integer)
process id
$Priority (string)
priority class, valid values are:
'HIGH', 'ABOVE_NORMAL', 'NORMAL', 'BELOW_NORMAL'