[BlueOnyx:05479] Re: need space

Chuck Tetlow chuck at tetlow.net
Mon Sep 27 16:50:07 -05 2010


Sure,

Go into any directory (like the root / directory in your case) and use the command "du -hs *".  That gives you the "Disk Usage".  The "h" switch gives it to you in human readable (KB, MB, GB).  And the "s" switch causes it to summarize, so directories are given to you as one entry with its size.

If you've ever got a question about what's eating up your drive or partition space - go to the root of that partition and use that command.  Look for the oversized or ridiculously big directory, switch to it, and run the command again.  Sooner or later, it will lead you to the file or directory eating up your drive space.

This can also be a good command to run BEFORE you have problems.  Run it against your root directory and the directory that makes up each of your partitions (like /var /usr /home).  Run those commands when you first set up the box and have it completely operational - and store the results.  If you've ever got questions afterward, you can compare sizes of the new box with the current.  For example - if you haven't added software, or done significant updates - /usr shouldn't change appreciably.  There are a lot of "this directory should change under these conditions" and "that directory should never change" rules.  You've got to know how your box works and what its doing to recognize those - but it can be very helpful to know what those directory size values were in a new-condition box.  And it can help you troubleshoot problems, broken software, configurations, or even hacked servers.

Chuck

P.S. - Using that command can put a significant LOAD on the system.  Don't do it during peak/busy hours.  And for systems with large/full drives - expect to be waiting a while!

---------- Original Message -----------
From: Carlos Quinones <wp4mxb at playero.net> 
To: gwaugh at frontstreetnetworks.com, BlueOnyx General Mailing List <blueonyx at blueonyx.it> 
Sent: Mon, 27 Sep 2010 15:47:38 -0400 
Subject: [BlueOnyx:05478] Re: need space

> i just got 9% more space i check the /boot every thing i just gain 9% 
> only 
> i there a way i can find out what is take to much space?? 
> 
> [root at www admin]#   df -h 
> Filesystem            Size  Used Avail Use% Mounted on 
> /dev/md1              1.9G  1.6G  260M  86% / 
> /dev/md2              1.9G  220M  1.6G  13% /var 
> /dev/md5              1.9G   34M  1.8G   2% /tmp 
> /dev/md6               67G  141M   64G   1% /home 
> none                  506M    0  506M   0% /dev/shm 
> 
> On Sun, 2010-09-26 at 22:50 -0500, Gerald Waugh wrote: 
> > On Sun, 2010-09-26 at 22:58 -0400, Carlos Quinones wrote: 
> > > is there a way to get more spece i see that my server is losing space 
> > > 
> > > [root at www logrotate.d]# df -h 
> > > Filesystem            Size  Used Avail Use% Mounted on 
> > > /dev/md1              1.9G  1.7G   94M  95% / 
> > > /dev/md2              1.9G  231M  1.6G  13% /var 
> > > /dev/md5              1.9G   34M  1.8G   2% /tmp 
> > > /dev/md6               67G  121M   64G   1% /home 
> > > none                  506M     0  506M   0% /dev/shm 
> > > 
> > > the /dev/md1 all most full i like gain space can any one help me please. 
> > > 
> > 
> > look at your kernels and remove some 
> > check the running kernel and remove all that are older 
> >   rpm -qa | grep kernel 
> > then 
> >   yum remove <kernel> 
> >   <kernel/s> found in the rpm -qa command 
> > then check /boot and remove any files for that kernel 
> > 
> > Gera;d 
> > 
> > 
> > 
> > 
> > 
> > > _______________________________________________ 
> > > Blueonyx mailing list 
> > > Blueonyx at blueonyx.it 
> > > http://www.blueonyx.it/mailman/listinfo/blueonyx 
> 
> _______________________________________________ 
> Blueonyx mailing list 
> Blueonyx at blueonyx.it 
> http://www.blueonyx.it/mailman/listinfo/blueonyx 
------- End of Original Message -------
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20100927/ac94c272/attachment.html>


More information about the Blueonyx mailing list