Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have local disk with 2T capacity attached to a host. Nearly 60 user home directories are stored on this disk.

Currently no disk quotas are enabled.

I need monitor the disk usage of individual users with the regards to this disk. I have tried du and find with the --max-depth=1 option, but these commands take too long to finish.

Is there any way to monitor (using a script) the per user disk usage without affecting the performance of the host?

share|improve this question
1  
Short answer is no. Using find or actually any kind of monitoring will affect disk performance. But here are a couple ideas: could you turn individual home directories into mounts (by using LVM for example) or run your monitoring script during low user activity? If your users aren't changing a lot, then LVM solution might be feasible, and it allows you to do your monitoring with df. –  Sami Laine Dec 2 '13 at 6:14
    
Any kind of disk usage tallying is going to have some overhead. The question is, is it going to be noticeable. Quotas have been around since 4BSD, when disks were 2 orders of magnitude slower than they are today and CPUs were 3 orders of magnitude slower, and many sites found the overhead to be unobjectionable even back then. I'd recommend trying it. –  Mark Plotnick Dec 2 '13 at 10:55
1  
enable quotas, that's exactly what they're for. –  Stéphane Chazelas Dec 2 '13 at 19:55
add comment

1 Answer 1

You can find the approximate usage size of the users, there is a tool Disk Usage Analyzer with this you can have tree view of the directories which will help finding the approximate usage size. Hope it helps.

share|improve this answer
2  
Disk Usage Analyzer is just some gnome's tools, so if you use some different de or perhaps no de or even gui at all, then installing that program pulls in many unneeded dependencies. –  Risto Salminen Dec 2 '13 at 11:02
    
I agree @RistoSalminen –  Ruban Savvy Dec 2 '13 at 11:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.