This is a valid argument for having each domain created/owned by an 
unprivileged system user. When you do that, you have handy tools like 
repquota to help you manage your disk space usage.  When used in 
conjunction with a perl script, I can format and report the disk space 
for 10,000 domains in about 6 seconds.

I've further taken that report and for all domains that are within 90% 
of their quota, check the disk usage for each user within the domain 
and report the disk space hogs. That report takes a couple minutes to 
run but is invaluable.

Otherwise, Doug's heading down the right path. Write yourself a script 
that loops for each domain, and then each user within the domain, and 
go through and start counting up the bits. You'll likely have issues 
with depending on the maildirquota file so make sure that if that file 
doesn't exist, you fall back to a more expensive but accurate method 
like "du".


On Wednesday, October 9, 2002, at 08:27  AM, Doug Clements wrote:

> Michael Funk wrote:
>> Is there a way to use vuserinfo to produce a report of user space
>> utilization, per user, for all users in the domain?
>> Most of the scripting stuff I have tried takes HOURS with 50,000 
>> users.
> vuserinfo doesn't store that data.. you pretty much just have to 
> either count up the mails, or look in the maildirquota file if you use 
> those kinds of quotas. I think parsing the quota file would be a bit 
> easier, but the perl script I use to look for abusive customers also 
> takes quite a while with a large amount of uses.
> I've spent a bit of time optimizing my script, so if you want to post 
> it, I'll take a look and see if it can sped up.
> --Doug

Reply via email to