ndb_perror 显示指定错误代码的 NDB 错误信息。这包括错误消息、错误类型,以及该错误是永久性的还是临时性的。此工具旨在作为 perror --ndb 的直接替代工具,后者已不再支持。ndb_perror shows information about an NDB
error, given its error code. This includes the error message,
the type of error, and whether the error is permanent or
temporary. This is intended as a drop-in replacement for
perror --ndb,
which is no longer supported.
用法Usage
ndb_perror [options]error_code
ndb_perror 不需要访问正在运行的 NDB 集群或任何节点(包括 SQL 节点)。要查看特定 NDB 错误的信息,请使用错误代码作为参数调用该程序,如下所示:ndb_perror does not need to access a running NDB Cluster, or any nodes (including SQL nodes). To view information about a given NDB error, invoke the program, using the error code as an argument, like this:
$> ndb_perror 323
NDB error code 323: Invalid nodegroup id, nodegroup already existing: Permanent error: Application error
如只显示错误信息,请使用 ndb_perror 的 --silent 选项(短格式 -s),如下所示:To display only the error message, invoke
ndb_perror with the
--silent option (short form
-s), as shown here:
$> ndb_perror -s 323
Invalid nodegroup id, nodegroup already existing: Permanent error: Application error
像 perror 一样,ndb_perror 接受多个错误代码:Like perror, ndb_perror accepts multiple error codes:
$> ndb_perror 321 1001
NDB error code 321: Invalid nodegroup id: Permanent error: Application error
NDB error code 1001: Illegal connect string
关于 ndb_perror 的其他程序选项将在本节后面说明。Additional program options for ndb_perror are described later in this section.
ndb_perror 取代了 perror 中不再受 NDB Cluster 支持的 --ndb 选项。为了在可能依赖 perror 获取 NDB 错误信息的脚本和其他应用程序中更容易替换,ndb_perror 支持其自身的 “dummy” --ndb 选项,这个选项不会执行任何操作。ndb_perror replaces perror
--ndb, which is no longer supported by NDB
Cluster. To make substitution easier in scripts and other
applications that might depend on perror for
obtaining NDB error information, ndb_perror
supports its own “dummy”
--ndb option, which does
nothing.
下表包含了所有特定于 NDB Cluster 程序 ndb_perror 的选项。表格后面有额外的描述。The following table includes all options that are specific to the NDB Cluster program ndb_perror. Additional descriptions follow the table.
附加选项Additional Options
命令行格式Command-Line Format --defaults-extra-file=path--defaults-extra-file=path类型Type 字符串String 默认值Default Value [none][none]在读取全局文件之后读取给定文件。Read given file after global files are read.
命令行格式Command-Line Format --defaults-file=path类型Type 字符串String 默认值Default Value [none][none]仅从指定文件读取默认选项。Read default options from given file only.
命令行格式Command-Line Format --defaults-group-suffix=string类型Type 字符串String 默认值Default Value [none][none]也读取组合了 concat(group, suffix) 的组。Also read groups with concat(group, suffix).
--help,-?命令行格式Command-Line Format --help--help显示程序帮助文本并退出。Display program help text and exit.
命令行格式Command-Line Format --login-path=path类型Type 字符串String 默认值Default Value [none][none]从登录文件读取给定路径。Read given path from login file.
命令行格式Command-Line Format --no-login-paths跳过从登录路径文件读取选项。Skips reading options from the login path file.
命令行格式Command-Line Format --ndb为了与依赖旧版本perror的应用程序兼容,这些版本使用该程序的
--ndb选项。当与ndb_perror一起使用时,该选项不会起任何作用,并且会被它忽略。For compatibility with applications depending on old versions of perror that use that program's--ndboption. The option when used with ndb_perror does nothing, and is ignored by it.命令行格式Command-Line Format --no-defaults--no-defaults除了登录文件之外,不从任何配置文件读取默认选项。Do not read default options from any option file other than login file.
命令行格式Command-Line Format --print-defaults打印程序参数列表然后退出。Print program argument list and exit.
--silent,-s命令行格式Command-Line Format --silent仅显示错误消息。Show error message only.
--version,-V命令行格式Command-Line Format --version打印程序版本信息并退出。Print program version information and exit.
--verbose,-v命令行格式Command-Line Format --verbose--verbose