Help - Search - Members - Calendar
Full Version: WHM showing incorrect user disk usage
The Planet Forums > Control Panels > cPanel/WHM
kcgbjc
My WHM shows a client of mine having over 900 MB of use in his account, however I tar'd and downloaded the entire public_html directory. After unzipping, I only had just over 150 MB of files.

I already ran /script/fixquotas.

What could be wrong? My guess is that others are wrong also.
LighthousePoint
public_html isn't the only dir that a user has... log into SSH, and use "du" to determine what files the user owns... Then add things up.
kcgbjc
Actually I thought you would mention that I should check at the users root dir. I should have done that in the first place.

DU, great!

I added all to 617,244. I should divide by 1024, correct? Which gives me 602.78 MB. Still off by over 300 MB or 50%!
LighthousePoint
well, we're getting there, at least.... Check to see if they have stuff outside their directory... Mail and databases count too, you know. If you can't find anything, does updating the quota entries in WHM show the correct usage (~600MB)
kcgbjc
Actually the numbers I gave were for his total dir, including mail (/home/user/) and WHM shows over 900MB.

I ran the fixquotas script this morning so it is updated. Is there another script that I am missing to update usage?
LighthousePoint
did you include any databases owned by the user? they are NOT in their directory....
kcgbjc
If I am looking in the right place, /var/lib/mysql, he has none.

On another note, I do have some huge log files in there tho. I'll have to take a look at that.
imin
from the / dir run this: find -user username and it will show you what files are owned by the user. there are probably files in some other dir that shouldn't be owned by him but are.. you need to chmod those files to the proper owner.
Guile
You can also do:

du -sm

Via SSH, this will show the total MB for that folder and ever sub-folder below it.

I.e. username is bob

cd to /home/bob and then run "du -sm". You will get the total MBs that user is occupying on the server.
LighthousePoint
Incorrect... It will show you the size of the /home/bob directory -- not the total space used by user "bob".
Guile
Yes, you are right, it won't include logs like /usr/local/apache/domlogs/bob
kcgbjc
Haven't had a chance yet to test it. But I am listening. Thanks guys!
Adz
I had a similar problem with account that I'd moved from another server, turn out all of the stuff in /var/autoinstallers was owned by my user! A quick chown sorted that out.
kcgbjc
Turns out all the backup files were attributed to each user causing their usage to be 4 times the norm (daily, weekly, monthly backups)

I chowned it and set a cron to do so nightly, so far successfully.
WebHS
I also had this problem

chown -c root:root /var/autoinstall <- fixed it:)
d-woo
chown -c root:root /var/autoinstall/english

or better yet
chown -R root:root /var/autoinstall
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.