homepage Welcome to WebmasterWorld Guest from 54.224.214.109
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
What's eating up our HD?
How can we know? And what is DU?
gutabo




msg:912973
 4:34 pm on Oct 20, 2003 (gmt 0)

Greetings,

We have a web site(0.8GB) on a 2.5GB hosting package(a VPS). However, we're getting waring mails about having only 10% of disk space left, and we gzip and download our logs on a daily basis. And how do you use DU? We've tried to use it but we have to get into every single directory to check it, and we have TONS of folders...

Thanks in advance!

 

RobinC




msg:912974
 4:49 pm on Oct 20, 2003 (gmt 0)

You'd need a proper linux guru to answer, but iirc all files and directories take a certain amount of header space too - they might also be rounding up to the nearest block. I might be wrong mind you ;-)

Another possibility is if there's a full snapshot as backup - which would really eat into your allotment.

Personally I'd email the provider and ask them where all the space is diappearing to...

quotations




msg:912975
 4:57 pm on Oct 20, 2003 (gmt 0)

Won't it go through the directories recursively?

For example,

# du /home ¦ sort -nr ¦ more

Should give you reverse numeric sorted space usage for every directory from /home down.

# du / ¦ sort -nr ¦ more

Should give you reverse numeric sorted space usage for the entire drive.

# du /home ¦ sort -nr > /du.txt

Should give you reverse numeric sorted space usage for the entire drive in a file /du.txt.

Put that in a cron job with >> and an echo $date and you should have a running log of what is going on.

gutabo




msg:912976
 5:16 pm on Oct 20, 2003 (gmt 0)

"Put that in a cron job with >> and an echo $date and you should have a running log of what is going on."

Mind helping me out with that? I know how to set a crontab, but I don't know how to use the syntax that much... :'(

gutabo




msg:912977
 5:17 pm on Oct 20, 2003 (gmt 0)

...And thanks! ^_^

gutabo




msg:912978
 2:24 am on Oct 21, 2003 (gmt 0)

HELP!

I can't run a cronjob with du, I get this:
du: : No such file or directory
du: sort: No such file or directory
du: -nr: No such file or directory
Please help me!

stechert




msg:912979
 8:51 am on Oct 21, 2003 (gmt 0)

if you want to get a more summarized report using du, try doing something like "du -sk *" in the root of your site.

-s means "just give me the summary for the named item"
-k means "give it to me in Kbytes, not bytes"
* means "for all of the subdirs immediately below my dir, but not their subdirs"

Cheers,
Andre

Josk




msg:912980
 9:33 am on Oct 21, 2003 (gmt 0)

Remember 'man'. Give you the manual for a command. So 'man du' will give you the manual page for du.

You may need to put the full path of a command. Use 'whereis xyz' to find something. Eg, 'whereis du' gives 'du: /usr/bin/du /usr/share/man/man1/du.1.gz'. This tells you that du is located in /usr/bin and has a man page in /usr/share/man/man1/. Do the same for sort, etc.

kenta




msg:912981
 11:33 am on Oct 21, 2003 (gmt 0)

If it's a VPS I assume you have multiple partitions. Did the warning e-mail say where the problem was?

You might want to just check "df -m" and see which partitions are eating up space.

gutabo




msg:912982
 5:24 pm on Oct 21, 2003 (gmt 0)

Thanks for your replies!

I tried to use the whereis command and it works but there's this warning:

Warning: couldn't stat file /usr/share/perl/man!

What does it mean?

I C&Ped a warning mail above(in a previous post)...

Here: I just tested this:

40 15 * * * /usr/bin/du / /usr/bin/sort -nr >> /path/to/file/dulog.`/bin/date +\%m\%d`.txt

This is the error message I got(I think it has something to do with the "")

du: : No such file or directory
du: -nr: No such file or directory

Isn't there a way to have something like this:
root 45kb
folder1 56456kb
folder2 3435kb
folder3 8766kb

So I can see how much does each folder(and subfloder below it) has but not get it listed(just the parent), so I can see that (in the example) folder1 is obviously the one with the "burden"?

Thanks in advance!

drbrain




msg:912983
 10:55 pm on Oct 21, 2003 (gmt 0)

df -h will tell you which mountpoint is at capacity.

go there then type

du -d1 -h

depth 1, human-readable output, from this directory.

To run from the crontab, you probably need to put the string in quotes. See crontab(5) (that's man 5 crontab).

danny




msg:912984
 4:48 am on Oct 27, 2003 (gmt 0)

DU is depleted uranium... stay away from that stuff!

[Unix commands aren't capitalised. Case sensitivity means that DU could be something completely different to du.]

gutabo




msg:912985
 5:22 pm on Oct 29, 2003 (gmt 0)

Thanks for your replies!

I can finally have an estimated of what's going on in our VPS. Now if I could only place it in a crontab... Any help there?

Thanks again!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved