getSessionMemoryStat
语法
getSessionMemoryStat()
参数
无
详情
获取当前节点所有连接会话的内存占用状态,返回一张表包含以下字段:
userId:用户 ID 或缓存类型的标识符(形如:__xxx__)。
sessionId:会话 ID。
memSize:会话所占用的内存,单位为字节。
remoteIP:发起会话的客户端的 IP。
remotePort:发起会话的客户端的端口号。
createTime:会话创建的时间,为 TIMESTAMP 类型。
lastActiveTime:会话最近一次执行脚本的时间戳。
缓存类型说明:
缓存类型 |
含义 |
---|---|
__DimensionalTable__ |
维度表缓存,单位为 Bytes。 |
__SharedTable__ |
共享表缓存,单位为 Bytes。 |
__OLAPTablet__ |
OLAP 引擎数据库表的缓存,单位为 Bytes。 |
__OLAPCacheEngine__ |
OLAP 引擎 cache engine 的内存占用,单位为 Bytes。 |
__OLAPCachedSymbolBase__ |
OLAP 引擎 SYMBOL 类型字典编码的缓存,单位为 Bytes。 |
__DFSMetadata__ |
分布式存储的元数据缓存,单位为 Bytes。 |
__StreamingPubQueue__ |
流数据发布队列里未处理的消息数。 |
__StreamingSubQueue__ |
流数据订阅队列里未处理的消息数。 |
注:
此函数无法统计到会话中正在执行的任务所占用的内存情况。
对于返回表中的 createTime 和 lastActiveTime,1.30.21.4 之前版本的 DolphinDB,返回零时区时间;1.30.21.4 及之后版本的 DolphinDB,返回当前时区的时间。
例子
$ 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 |
||||
__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 |