listLoginUsers

语法

System.listLoginUsers( [options], [filter] )

类别

System

描述

列出登录用户的信息

参数

参数名参数类型默认值描述是否必填
optionsJSON默认不显示详细信息显示模式
filterJSON默认显示全部登录用户信息筛选条件

options 参数详细说明如下:

属性值类型是否必填格式描述
detailBool{ detail: true }是否显示详细信息

Note:

filter 参数支持对结果中的某些字段进行 and 、 or 、not 和精确匹配计算,对结果集进行筛选。

返回值

返回登录用户的消息。

错误

如果出错则抛异常,并输出错误信息,可以通过getLastErrMsg()获取错误信息或通过getLastError()获取错误码。关于错误处理可以参考常见错误处理指南

常见错误可参考错误码

示例

  • 列出所有登录用户的信息;
  1. > System.listLoginUsers()
  2. {
  3. "user": "sequoiadb"
  4. }
  5. {
  6. "user": "username"
  7. }
  8. ...
  • 对结果进行筛选:
  1. > System.listLoginUsers( { detail: true }, { "tty": "tty1" } )
  2. {
  3. "user": "sequoiadb",
  4. "time": "2019-05-10 18:37",
  5. "from": "",
  6. "tty": "tty1"
  7. }