Last active
June 15, 2018 06:02
-
-
Save sarjarapu/6d2f053b160592ab1d091c1425dcaa0f to your computer and use it in GitHub Desktop.
A JavaScript function calls showing the database printSlaveReplicationInfo command output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.printSlaveReplicationInfo() | |
/* | |
source: mon02:27000 | |
syncedTo: Fri Jun 15 2018 01:29:11 GMT+0000 (UTC) | |
0 secs (0 hrs) behind the primary | |
source: mon03:27000 | |
syncedTo: Fri Jun 15 2018 01:29:11 GMT+0000 (UTC) | |
0 secs (0 hrs) behind the primary | |
*/ | |
rs.status().members.map(x=>x.pingMs) | |
// [ undefined, NumberLong(0), NumberLong(78) ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment