How can I see what's eating my disk space?

He has: 688 posts

Joined: Feb 2001

I'm getting automated messages about running out of disk space but I can't figure out what has changed much lately. My thought is that perhaps some files are being generated internally that are starting to pile up. But how do I find it?

The tools at my disposal are basic: cpanel (which contains online file manager) and WS_FTP. I can see file sizes but nothing can tell me directory sizes that would let me find the problem without searching for a needle in a haystack.

ideas?

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

You didn't mention it, but some people have it and do not realize it until they check for it, so I'm asking Smiling

If you can, try du -h ~ > files.txt to create a text file (files.txt) of what all files are in your home directory.

if will show somthing like:

  14K /usr/whatever/path/dir1/file01.txt
  13K /usr/whatever/path/dir1/file02.txt
  18K /usr/whatever/path/dir1/file03.txt
  45K /usr/whatever/path/dir1
  15K /usr/whatever/path/dir2/file01.txt
  12K /usr/whatever/path/dir2/file02.txt
  16K /usr/whatever/path/dir2/file03.txt
  43K /usr/whatever/path/dir2
  88K /usr/whatever/path
 
'

Note first it lists the individual files, then at the bottom gives you the total for the directory (dir 1 has 45k, dir 2 has 43k) etc.

You may need to check with hosting company as to where to look, may be some extras.

ie. where I have hosting, need to check /usr/boxes/username for all e-mail sitting on the server as well.

-Greg

He has: 688 posts

Joined: Feb 2001

Greg K wrote: If you can, try du -h ~ > files.txt to create a text file (files.txt) of what all files are in your home directory.

That sounds like it'll work, but I'm not following you on what I should acutally do.
Confused

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

fifeclub wrote: That sounds like it'll work, but I'm not following you on what I should acutally do.
Confused

Just run that from a command line. Then download and view the file contents.

Mark Hensler
If there is no answer on Google, then there is no question.

Roo's picture

She has: 840 posts

Joined: Apr 1999

If you've enabled something like spam assassin or enabled e-mail on your site, check for a buildup of messages on the server.

I recently went through this same thing...and the stored messages were taking up most of my disc space...there was over 125 MB of messages stored in mail folders.

Roo

Busy's picture

He has: 6,151 posts

Joined: May 2001

log files can build up too if not removed monthly (most hosts do this automatically).
You said disk space not bandwidth, so hotlinking is probably out of the question but check your log files for images calls as repeated calls from forums can really build up your log files

He has: 688 posts

Joined: Feb 2001

Shocked I've been making sites (mostly as a hobby) for nearly a decade and I've still never used goodies like command lines. Just something I never had to teach myself. Is that like a shell access type of thing? If so, I've already discovered that I only have shell access on my main account and not individual sites,.so I guess that won't work anyway. Sad

So far it sounds like I need to keep manually checking files folder by folder. Sad

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

Don't worry, I've never had to do that stuff either. Am genereally very Confused about it.

They have: 63 posts

Joined: Aug 2005

same here...i do it manually too like checking folder to folder.

off topic: how would you know if someone's hacking on your computer? like im in a office and on remote connection. every 4 am, i always experience slowing down like 2 accounts are using. usualy i just use 3 firefox windows, word,gaim,yahoo and messenger. At home, i tried to test with my personal computer if it'll also be similar but i didnt get any probs.

demonhale's picture

He has: 3,278 posts

Joined: May 2005

check for backdoors...

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

also since it is the same time, check for scheduled taks. Maybe AV software starts a scan of the system, scan disk or some other utility could be chekcing your system, or some software doing a night check for file updates.

If it is windows, and you know it will happen each night at 4am, try doing a CTRL-ALT-DEL about 5 minutes till and then choose Task Manager. Make a list (or if you have a great memory, remember them) of all Processes running. Then right at 4am when you fel it start to bog down or the drive starts going nuts, check the processes again. Compare the differences. (note, when you do this, try to have a little open as possible to make the list smaller).

-Greg

They have: 63 posts

Joined: Aug 2005

Greg K wrote:
If it is windows, and you know it will happen each night at 4am, try doing a CTRL-ALT-DEL about 5 minutes till and then choose Task Manager. Make a list (or if you have a great memory, remember them) of all Processes running. Then right at 4am when you fel it start to bog down or the drive starts going nuts, check the processes again. Compare the differences. (note, when you do this, try to have a little open as possible to make the list smaller).

-Greg

Thanks a lot:) i will...

Gangsta penguin's picture

He has: 9 posts

Joined: Jan 2006

Did you try a disk clean up

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.