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?

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

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

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