getSessionMemoryStat
Syntax
getSessionMemoryStat()
Arguments
None
Details
Return information about memory usage of all sessions on the current node. It returns a table containing the following columns:
-
userId: the user ID or the cache type (in the format of __xxx__).
-
sessionId: the session ID.
-
memSize: memory usage of all sessions (in Bytes).
-
remoteIP: the IP address of the client that initiates the session.
-
remotePort: the port number of the client that initiates the session.
-
createTime: the creation time (of TIMESTAMP data type) of session.
-
lastActiveTime: last timestamp of the execution.
The cache type can be:
Cache Types | Meaning |
---|---|
__DimensionalTable__ | the cache of dimension tables (in Bytes) |
__SharedTable__ | the cache of shared tables (in Bytes) |
__OLAPTablet__ | the cache of the OLAP databases (in Bytes) |
__OLAPCacheEngine__ | the memory usage of OLAP cache engine (in Bytes) |
__OLAPCachedSymbolBase__ | the cache of SYMBOL base in OLAP engine (in Bytes) |
__DFSMetadata__ | the cache of DFS metadata (in Bytes) |
__StreamingPubQueue__ | the unprocessed messages in a publisher queue |
__StreamingSubQueue__ | the unprocessed messages in a subscriber queue |
Note:
-
This function does not return the memory occupied by tasks being executed in the session.
-
For the columns createTime and lastActiveTime in the result table, versions before 1.30.21.4/2.00.9.4 return GMT time. From version 1.30.21.4/2.00.9.4 onwards, these columns return time in your current time zone.
Examples
t = getSessionMemoryStat();
t;
userId | sessionId | memSize | remoteIP | remotePort | createTime | lastActiveTime |
---|---|---|---|---|---|---|
__DimensionalTable__ | 0 | 0.0.0.0 | ||||
__SharedTable__ | 0 | 0.0.0.0 | ||||
__OLAPTablet__ | 0 | 0.0.0.0 | ||||
__OLAPCacheEngine__ | 0 | 0.0.0.0 | ||||
__OLAPCachedSymbolBase__ | 0 | 0.0.0.0 | ||||
__DFSMetadata__ | 2769 | 0.0.0.0 | ||||
__StreamingPubQueue__ | 0 | 0.0.0.0 | ||||
__StreamingSubQueue__ | 0 | 0.0.0.0 | ||||
admin | 2882591513 | 1416 | 60.176.105.0 | 20861 | 2023.02.15T02:15:22.384 | 2023.02.15T02:24:16.307 |