AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。
Docs Menu

db.printReplicationInfo()(mongoshメソッド)

db.printReplicationInfo()

レプリカセット メンバーのoplogの形式化されたレポートを出力します。 表示されるレポートは、 db.getReplicationInfo()によって返されたデータを形式します。

The output of db.printReplicationInfo() is identical to that of rs.printReplicationInfo().

注意

The db.printReplicationInfo() method run in mongosh does not return JSON. Use db.printReplicationInfo() for manual inspection, and db.getReplicationInfo() in scripts.

The following example is a sample output from the db.printReplicationInfo() method run on the primary:

configured oplog size: 192MB
log length start to end: 65422secs (18.17hrs)
oplog first event time: Mon Jun 23 2014 17:47:18 GMT-0400 (EDT)
oplog last event time: Tue Jun 24 2014 11:57:40 GMT-0400 (EDT)
now: Thu Jun 26 2014 14:24:39 GMT-0400 (EDT)

db.printReplicationInfo() formats and prints the data returned by db.getReplicationInfo():

構成済み oplog サイズ

db.getReplicationInfo().logSizeMB値を表示。

ログの長さの開始から終了

db.getReplicationInfo().timeDiffとdb.getReplicationInfo().timeDiffHoursの値を表示。

oplog の最初のイベント時間

db.getReplicationInfo().tFirstを表示します。

oplog の最終イベント時間

db.getReplicationInfo().tLastを表示します。

になりました

db.getReplicationInfo().nowを表示します。

データの説明については、 db.getReplicationInfo()を参照してください。

このメソッドは、次の環境でホストされている配置で使用できます。

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

注意

This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.

  • MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン

  • MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン

このページを評価

項目一覧