ADMIN_GET_MEM_USAGE table function - Get total memory consumption for instance

The ADMIN_GET_MEM_USAGE table function gets the total memory consumption for a given instance.

Syntax

Read syntax diagramSkip visual syntax diagramADMIN_GET_MEM_USAGE(member)

The schema is SYSPROC.

Table function parameters

member
An optional input argument of type integer that specifies the member from which the memory usage statistics are retrieved. If -1 or the NULL value is specified, data is returned from the currently connected member.

Authorization

One of the following authorities is required to execute the routine:
  • EXECUTE privilege on the routine
  • DATAACCESS authority
  • DBADM authority
  • SQLADM authority

Default PUBLIC privilege

None

Information returned

Table 1. Information returned for ADMIN_GET_MEM_USAGE
Column Name Data type Description
MEMBER SMALLINT member - Database member monitor element
MAX_MEMBER_MEM BIGINT The maximum amount of memory (in bytes) available for the member.
CURRENT_MEMBER_MEM BIGINT The amount of memory (in bytes) currently used by the member.
PEAK_MEMBER_MEM BIGINT The peak or high watermark of memory (in bytes) used by the member since the instance started.

Examples

Example 1: Report memory usage for all members

SELECT MEMBER, MAX_MEMBER_MEM, CURRENT_MEMBER_MEM, PEAK_MEMBER_MEM
   FROM TABLE(SYSPROC.ADMIN_GET_MEM_USAGE()) AS T

MEMBER MAX_MEMBER_MEM       CURRENT_MEMBER_MEM   PEAK_MEMBER_MEM     
------ -------------------- -------------------- --------------------
     0           7430103040            958169088            958300160
     3           7430103040            951615488            951615488
     1           7430103040            952664064            952664064
     2           7430103040            951615488            951615488

  4 record(s) selected.