MongoDB - I can't find the filesize of my database -


strangely, on mongodb 3.0.3 standalone server, after running db.stats() command on database output not showing information filesize of database except non existing ones :

> use mybase switched db mybase > show collections xmlcache system.profile > db.stats() {         "db" : "mybase",         "collections" : 2,         "objects" : 62228,         "avgobjsize" : 139963.13608022113,         "datasize" : 8709626032,         "storagesize" : 3128832000,         "numextents" : 0,         "indexes" : 9,         "indexsize" : 15106048,         "ok" : 1 } > db.runcommand({ dbstats: 1, scale: 1 }) {         "db" : "mybase",         "collections" : 2,         "objects" : 63765,         "avgobjsize" : 138065.89466007997,         "datasize" : 8803771773,         "storagesize" : 3129327616,         "numextents" : 0,         "indexes" : 9,         "indexsize" : 15286272,         "ok" : 1 } > show dbs abase                     0.035gb anotherbase               0.036gb mybase                    2.929gb local                     0.000gb > use dummy switched db dummy > db.stats() {         "db" : "dummy",         "collections" : 0,         "objects" : 0,         "avgobjsize" : 0,         "datasize" : 0,         "storagesize" : 0,         "numextents" : 0,         "indexes" : 0,         "indexsize" : 0,         "filesize" : 0,         "ok" : 1 } 

running same command on either 2.6.9 or 3.0.3 server in replicaset same database me more informations , don't understand why (and bothers me need information scripts) :

rs0:secondary> use mybase switched db mybase rs0:secondary> show collections xmlcache system.indexes system.profile rs0:secondary> db.stats() {         "db" : "mybase",         "collections" : 4,         "objects" : 127225,         "avgobjsize" : 36730.40902338377,         "datasize" : 4673026288,         "storagesize" : 6541684736,         "numextents" : 24,         "indexes" : 9,         "indexsize" : 49333984,         "filesize" : 55741251584,         "nssizemb" : 16,         "extentfreelist" : {                 "num" : 52,                 "totalsize" : 45903593184         },         "datafileversion" : {                 "major" : 4,                 "minor" : 22         },         "ok" : 1 } rs0:secondary> show dbs abase                           0.078gb anotherbase                     0.453gb mybase                         51.929gb local                           6.075gb rs0:secondary> 

where filesize information hiding ?

dbstats.filesize

only present when using mmapv1 storage engine.

source.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -