Quote:
Originally Posted by mlanner Is there a way to print a summary of each account and/or domain to find the total amount of storage used? |
Grand summary by domain:
Code:
zmprov gqu `zmhostname` | grep domain.com | awk '{ sum += $3; } END { print sum; }' Walkthrough:
Navigate to a directory writable by zimbra, or create one (so that we can use > & < out/in to a file later).
CLI:
Quote:
|
zmprov GetQuotaUsage localhost
|
Spits it out in bytes. Second column is max quota (0=unlimited). Third column will be used amount.
To flip the output order could do something like:
Code:
zmprov gqu `zmhostname` | awk {'print " "$3" "$2" "$1'} > sizes.txt SOAP GetQuotaUsageRequest
Code:
zmsoap -z -v -e GetQuotaUsageRequest domain=domain.com
GetQuotaUsageResponse is still per user, just limited search to domain.
Quote:
<GetQuotaUsageResponse xmlns="urn:zimbraAdmin" searchTotal="#" more="0">
<account name="user@domain.com" id="string" limit="0" used="265941" ></account>
|
But combining grep for domain with awk, plus another awk to sum the numbers using something like:
Quote:
|
awk '{ sum += $1; } END { print sum; }' < sizes.txt
|
And all together you get:
Code:
zmprov gqu `zmhostname` | grep domain.com | awk {'print " "$3" " '} > sizes.txt
awk '{ sum += $1; } END { print sum; }' < sizes.txt Simply remove | grep domain.com if you want everyone.
Combined onto one line you can find out how much space everyone's taking up (well keep in mind there's single-instance storage for those on the same mailstore):
Code:
zmprov gqu `zmhostname` | awk '{ sum += $3; } END { print sum; }' Quote:
Originally Posted by mlanner Any plans on bringing some kind of reporting functionality to the admin UI in the future? |
Admin console: Server Statistics > Server > Mailbox Quota tab ?
Looking for better search on quota/by domain in the admin console?
There's some RFE's open like
Bug 17343 - domain statistics &
Bug 13419 - Admin>ServerStatistics>MailboxQuota: cant easily search/view quota of an account check them/vote/file away.