Skip to content

Add output example to db.printReplicationInfo() #1887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions source/reference/method/db.printReplicationInfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@ db.printReplicationInfo()
.. |method| replace:: :method:`db.printReplicationInfo()`
.. |method-alternative| replace:: :method:`db.getReplicationInfo()`

Use this method to check the size of the oplog for a given
:term:`replica set` member, connect to the member in a :program:`mongo`
shell and run the :method:`ds.printReplicationInfo()` method.

The output displays the size of the oplog and the date ranges of the
operations contained in the oplog. In the following example, the oplog
is about 10MB and is able to fit about 26 hours (94400 seconds) of
operations:

.. code-block:: javascript

configured oplog size: 10.10546875MB
log length start to end: 94400 (26.22hrs)
oplog first event time: Mon Mar 19 2012 13:50:38 GMT-0400 (EDT)
oplog last event time: Wed Oct 03 2012 14:59:10 GMT-0400 (EDT)
now: Wed Oct 03 2012 15:00:21 GMT-0400 (EDT)

.. include:: /includes/note-method-does-not-return-json.rst

The output of :method:`db.printReplicationInfo()` is identical to
Expand Down