ndb_perror 顯示關於 NDB 錯誤的資訊,並提供錯誤代碼。這包括錯誤訊息、錯誤類型,以及錯誤是永久的還是暫時的。這旨在作為 perror --ndb
的替代程式,不再支援後者。
用法
ndb_perror [options] error_code
ndb_perror 不需要存取正在執行的 NDB Cluster 或任何節點(包括 SQL 節點)。若要檢視關於特定 NDB 錯誤的資訊,請叫用程式,並使用錯誤代碼作為引數,如下所示
$> ndb_perror 323
NDB error code 323: Invalid nodegroup id, nodegroup already existing: Permanent error: Application error
若只要顯示錯誤訊息,請使用 ndb_perror 和 --silent
選項(簡短形式 -s
)叫用,如此處所示
$> ndb_perror -s 323
Invalid nodegroup id, nodegroup already existing: Permanent error: Application error
與 perror 相同,ndb_perror 接受多個錯誤代碼
$> ndb_perror 321 1001
NDB error code 321: Invalid nodegroup id: Permanent error: Application error
NDB error code 1001: Illegal connect string
本節稍後會說明 ndb_perror 的其他程式選項。
ndb_perror 取代了 perror --ndb
,NDB Cluster 不再支援該選項。為了讓依賴 perror 以取得 NDB 錯誤資訊的指令碼和其他應用程式更容易進行替代,ndb_perror 支援其自己的 「虛擬」 --ndb
選項,該選項不做任何事。
下表包含 NDB Cluster 程式 ndb_perror 特有的所有選項。其他說明位於表格之後。
其他選項
-
命令列格式 --defaults-extra-file=path
類型 字串 預設值 [無]
在讀取全域檔案後讀取給定的檔案。
-
命令列格式 --defaults-file=path
類型 字串 預設值 [無]
僅從給定的檔案讀取預設選項。
-
命令列格式 --defaults-group-suffix=string
類型 字串 預設值 [無]
同時讀取 concat(group, suffix) 的群組。
--help
、-?
命令列格式 --help
顯示程式說明文字並結束。
-
命令列格式 --login-path=path
類型 字串 預設值 [無]
從登入檔案讀取給定的路徑。
-
命令列格式 --no-login-paths
跳過從登入路徑檔案讀取選項。
-
命令列格式 --ndb
為了與依賴舊版本 perror 的應用程式相容,該程式使用該程式的
--ndb
選項。當與 ndb_perror 一起使用時,該選項不做任何事,並會被忽略。 -
命令列格式 --no-defaults
不要從登入檔案以外的任何選項檔案讀取預設選項。
-
命令列格式 --print-defaults
列印程式引數清單並結束。
--silent
、-s
命令列格式 --silent
僅顯示錯誤訊息。
--version
、-V
命令列格式 --version
列印程式版本資訊並結束。
--verbose
、-v
命令列格式 --verbose
詳細輸出;使用
--silent
停用。