天天看点

【SequoiaDB巨杉数据库】System-getNetcardInfogetNetcardInfo

getNetcardInfo

语法

System.getNetcardInfo()

类别

System

描述

获取网卡的信息

参数

返回值

返回网卡的信息

错误

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

常见错误可参考错误码。

示例

  • 获取网卡的信息
    > System.getNetcardInfo()
    {
      "Netcards": [
        {
          "Name": "lo",
          "Ip": "127.0.0.1"
        },
        {
          "Name": "ens160",
          "Ip": "192.168.20.62"
        }
      ]
    }