API for getting disk usage info

4 posts / 0 new
Last post
#1 Mon, 06/13/2011 - 04:01
pran

API for getting disk usage info

Is there an API that allows a developer to get the disk usage info of a particular virtual host/domain?

Mon, 06/13/2011 - 04:13
Locutus

I could not find a dedicated API command for that, but I suppose you write a shell script utilizing the Linux du command on the required directories, which would be public_html for web page data, homes for user mailboxes and domains for sub-servers.

Also, you can find out which servers and users exist and what directories they have using

virtualmin list-domains --simple-multiline
virtualmin list-users --all-domains --multiline
Mon, 06/13/2011 - 04:18 (Reply to #2)
pran

Thanks @Locutus for the info. I guess I have to write my own script for this purpose.

Mon, 06/13/2011 - 06:50
Locutus

Yeah, with the powerful stuff that bash can do, it shouldn't be too hard. :) But maybe the developers here can take this as a request for improvement, and will add such a script in Virtualmin some time.

Topic locked