1, view the database
> db.stats ();
{
"db": "Test", //Current database
"collections": 3, //Current database How many table
"Objects": 4, //Current database All table how many data
" Avgobjsize ": Wuyi, //per data average size
" datasize ": 204,// total size of all data
" storagesize ": 16384, // All data for disk size
"numextents": 3,
"Indexes": 1, //index number
"Indexsize": 8176,// index size
"fileSize ": 201326592, //pre-assigned to database file size
" Nssizemb ":"
datafileversion ": {
" Major ": 4,
" minor ": 5< c25/>},
"OK": 1
}
2, view the database table
> db.posts.stats ();
{
"ns": "Test.posts",
"Count": 1,
"size": ","
avgobjsize ":", "
storagesize": 8192,
"Numextents": 1,
"nindexes": 1,
"lastextentsize": 8192,
"Paddingfactor": 1,
"systemflags": 1,< c41/> "UserFlags": 0,
"totalindexsize": 8176,
"indexsizes": {
"_id_": 8176
},
"OK": 1
}