Para agentes de IA: um índice de documentação está disponível em https://www.mongodb.com/pt-br/docs/llms.txt — as versões de markdown de todas as páginas estão disponíveis anexando .md a qualquer caminho de URL.
Menu Docs

rs.printReplicationInfo() (método mongosh)

rs.printReplicationInfo()

Prints a formatted report of the replica set member's oplog. The displayed report formats the data returned by db.getReplicationInfo(). The output of rs.printReplicationInfo() is identical to that of db.printReplicationInfo().

Observação

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

The following example is a sample output from the rs.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)

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

tamanho do oplog configurado

Exibe o valor db.getReplicationInfo().logSizeMB .

comprimento do registro do início ao fim

Exibe os valores db.getReplicationInfo().timeDiff e db.getReplicationInfo().timeDiffHours .

hora do primeiro evento do oplog

Exibe o db.getReplicationInfo().tFirst.

oplog hora do último evento

Exibe o db.getReplicationInfo().tLast.

agora

Exibe o db.getReplicationInfo().now.

Consulte db.getReplicationInfo() para obter uma descrição dos dados.

Esse método está disponível em implantações hospedadas nos seguintes ambientes:

  • MongoDB Atlas: o serviço totalmente gerenciado para implantações do MongoDB na nuvem

Importante

Esse comando não é suportado em clusters M0 e Flex. Para obter mais informações, consulte Comandos não suportados.

  • MongoDB Enterprise: a versão autogerenciada e baseada em assinatura do MongoDB

  • MongoDB Community: uma versão com código disponível, de uso gratuito e autogerenciada do MongoDB

Avalie esta página