fileSize without blocking server?

29 views
Skip to first unread message

whit537

unread,
Apr 26, 2012, 4:09:59 PM4/26/12
to mongod...@googlegroups.com
Is there a way to compute the true size of a MongoDB database on disk using server APIs without blocking the server for 15 minutes by calling dbstats?


chad

Sid

unread,
Apr 26, 2012, 5:56:50 PM4/26/12
to mongodb-user
I don't think so. You can, however, use simple linux commands (du -ch
filepattern) to find the size of data files for a db on the disk.

whit537

unread,
Apr 26, 2012, 9:21:51 PM4/26/12
to mongod...@googlegroups.com
Sid,

> I don't think so.

Bummer. :-(


> You can, however, use simple linux commands (du -ch 
> filepattern) to find the size of data files for a db on the disk. 

I'm specifically looking for a server API. My use case is adding disk 
usage statistics to the Mongs db browser:


Mongs is designed to attach to arbitrary MongoDB servers, but can't 
at all assume that it has shell access on the underlying host. That's
why I can't use OS filesystem tools here.


chad

Scott Hernandez

unread,
Apr 27, 2012, 10:46:43 AM4/27/12
to mongod...@googlegroups.com

Hostinfo is being added for the next release so you can get more system/host info. Disks are not in there but you could add a feature req for that in jira.

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-user/-/nk5Xf_W9sPQJ.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

whit537

unread,
Apr 27, 2012, 11:46:54 AM4/27/12
to mongod...@googlegroups.com
Hostinfo is being added for the next release so you can get more system/host info. Disks are not in there but you could add a feature req for that in jira.

Thanks Scott, will take this to JIRA.


chad
Reply all
Reply to author
Forward
0 new messages