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.
Cache Types:
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) |
TSDBCacheEngine | the cache of the TSDB engine (in Bytes) |
TSDBLevelFileIndex | the cache of level file index in the TSDB engine (in Bytes) |
TSDBCachedSymbolBase | the cache of SYMBOL base in TSDB engine (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 | ||||
__OLAPCachedSymbolBa... | 0 | 0.0.0.0 | ||||
DFSMetadata | 2769 | 0.0.0.0 | ||||
TSDBCacheEngine | 0 | 0.0.0.0 | ||||
TSDBLevelFileIndex | 0 | 0.0.0.0 | ||||
__TSDBCachedSymbolBa... | 0 | 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 |