Skip to content

Instantly share code, notes, and snippets.

View meticulous-dft's full-sized avatar

Ming He meticulous-dft

View GitHub Profile
@meticulous-dft
meticulous-dft / initialSyncProgress.js
Created May 4, 2025 23:53 — forked from alexbevi/initialSyncProgress.js
Script to help identify the progress of an intial sync of a MongoDB SECONDARY node
/*
* initialSyncProgress
* @author Alex Bevilacqua <alex@alexbevi.com>
*
* Can be run against a MongoDB 3.4+ mongod that is in STARTUP2 (intitial sync) state to gain some
* insight into how the sync is progressing. This script WILL NOT tell you how long until the sync
* is complete, but based on how the script reports progress can be used to estimate this.
*
* usage:
* mongo --quiet --eval "load('initialSyncProgress.js'); initialSyncProgress();"