Hello,
You could try to use just the below command.
db.adminCommand("listDatabases").totalSizeMb;
This should return the sum of all the sizeOnDisk fields, expressed in megabytes. as per this documentation link.
Regards,
Mohamed Elshafey
Hello,
You could try to use just the below command.
db.adminCommand("listDatabases").totalSizeMb;
This should return the sum of all the sizeOnDisk fields, expressed in megabytes. as per this documentation link.
Regards,
Mohamed Elshafey