> 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

# db.getReplicationInfo() (mongosh method)

## Definition

Returns a document with the status of the replica set, using data polled from the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog). Use this output when diagnosing issues with replication.

## 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

**Note:**

This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, 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

## Output

Returns the total size of the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) in megabytes. This refers to the total amount of space allocated to the oplog rather than the current size of operations stored in the oplog.

The oplog can grow past its configured size limit to avoid deleting the [`majority commit point`.](https://www.mongodb.com/docs/manual/reference/command/replsetgetstatus.md#mongodb-data-replSetGetStatus.optimes.lastCommittedOpTime)

Returns the total amount of space used by the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) in megabytes. This refers to the total amount of space currently used by operations stored in the oplog rather than the total amount of space allocated.

Returns an error message if there are no entries in the oplog.

Only present when there are no entries in the oplog. Reports the number of items or rows in the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) (e.g. `0`).

Returns the difference between the first and last operation in the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog), represented in seconds.

Only present if there are entries in the oplog.

Returns the difference between the first and last operation in the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog), rounded and represented in hours.

Only present if there are entries in the oplog.

Returns a timestamp for the first (i.e. earliest) operation in the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog). Compare this value to the last write operation issued against the server.

Only present if there are entries in the oplog.

Returns a timestamp for the last (i.e. latest) operation in the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog). Compare this value to the last write operation issued against the server.

Only present if there are entries in the oplog.

Returns a timestamp that reflects the current time. The shell process generates this value, and the datum may differ slightly from the server time if you're connecting from a remote host as a result. Equivalent to [`Date()`.](https://www.mongodb.com/docs/manual/reference/mongodb-extended-json.md#mongodb-bsontype-Date)

Only present if there are entries in the oplog.
