> This page location: /docs.md > /docs/development.md > /docs/manual/reference/method.md

> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# rs.printReplicationInfo() (mongosh method)

## Definition

Prints a formatted report of the replica set member's [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog). The displayed report formats the data returned by [`db.getReplicationInfo()`](https://www.mongodb.com/docs/manual/reference/method/db.getreplicationinfo.md#mongodb-method-db.getReplicationInfo).  The output of [`rs.printReplicationInfo()`](https://www.mongodb.com/docs/manual/reference/method/rs.printreplicationinfo.md#mongodb-method-rs.printReplicationInfo) is identical to that of [`db.printReplicationInfo()`.](https://www.mongodb.com/docs/manual/reference/method/db.printreplicationinfo.md#mongodb-method-db.printReplicationInfo)

**Note:**

The [`rs.printReplicationInfo()`](https://www.mongodb.com/docs/manual/reference/method/rs.printreplicationinfo.md#mongodb-method-rs.printReplicationInfo) method run in [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) does **not** return [JSON](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-JSON). Use [`rs.printReplicationInfo()`](https://www.mongodb.com/docs/manual/reference/method/rs.printreplicationinfo.md#mongodb-method-rs.printReplicationInfo) for manual inspection, and [`db.getReplicationInfo()`](https://www.mongodb.com/docs/manual/reference/method/db.getreplicationinfo.md#mongodb-method-db.getReplicationInfo) in scripts.

### Output Example

The following example is a sample output from the [`rs.printReplicationInfo()`](https://www.mongodb.com/docs/manual/reference/method/rs.printreplicationinfo.md#mongodb-method-rs.printReplicationInfo) method run on the primary:

```none
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)
```

### Output Fields

[`rs.printReplicationInfo()`](https://www.mongodb.com/docs/manual/reference/method/rs.printreplicationinfo.md#mongodb-method-rs.printReplicationInfo) formats and prints the data returned by [`db.getReplicationInfo()`:](https://www.mongodb.com/docs/manual/reference/method/db.getreplicationinfo.md#mongodb-method-db.getReplicationInfo)

configured oplog size

Displays the [`db.getReplicationInfo().logSizeMB`](https://www.mongodb.com/docs/manual/reference/method/db.getreplicationinfo.md#mongodb-data-db.getReplicationInfo--.logSizeMB) value.

log length start to end

Displays the [`db.getReplicationInfo().timeDiff`](https://www.mongodb.com/docs/manual/reference/method/db.getreplicationinfo.md#mongodb-data-db.getReplicationInfo--.timeDiff) and [`db.getReplicationInfo().timeDiffHours`](https://www.mongodb.com/docs/manual/reference/method/db.getreplicationinfo.md#mongodb-data-db.getReplicationInfo--.timeDiffHours) values.

oplog first event time

Displays the [`db.getReplicationInfo().tFirst`.](https://www.mongodb.com/docs/manual/reference/method/db.getreplicationinfo.md#mongodb-data-db.getReplicationInfo--.tFirst)

oplog last event time

Displays the [`db.getReplicationInfo().tLast`.](https://www.mongodb.com/docs/manual/reference/method/db.getreplicationinfo.md#mongodb-data-db.getReplicationInfo--.tLast)

now

Displays the [`db.getReplicationInfo().now`.](https://www.mongodb.com/docs/manual/reference/method/db.getreplicationinfo.md#mongodb-data-db.getReplicationInfo--.now)

See [`db.getReplicationInfo()`](https://www.mongodb.com/docs/manual/reference/method/db.getreplicationinfo.md#mongodb-method-db.getReplicationInfo) for description of the data.

## Compatibility

This method is available in deployments hosted in the following environments:

- [MongoDB Atlas](https://www.mongodb.com/docs/atlas): The fully managed service for MongoDB deployments in the cloud

**Important:**

This command is not supported in M0 and Flex clusters. For more information, see [Unsupported Commands.](https://www.mongodb.com/docs/atlas/unsupported-commands/)

- [MongoDB Enterprise](https://www.mongodb.com/docs/manual/administration/install-enterprise.md#std-label-install-mdb-enterprise): The subscription-based, self-managed version of MongoDB

- [MongoDB Community](https://www.mongodb.com/docs/manual/administration/install-community.md#std-label-install-mdb-community-edition): The source-available, free-to-use, and self-managed version of MongoDB
