We had a similar issue with the '/' partition going below 500megs of
free space and
locking out the admin desktop.
We found that '/boot' and '/lib/modules' were growing with the yum
updates leaving the
previous OS revisions. We removed all but the 2 most recent OS versions
(including current).
This gained us back about 150meg of space on '/' and thus unlocked the
admin desktop.
Here is a 'tree' script that runs thru all directories and gives their
sizes so you can pick out those that may need
attention. Hope this helps track down your '/var' space problem.
This script comes without warranty. Use at your own risk.
------------------------------------------------------------------------------------------------------------------------
#!/bin/sh
# (at mark) (#) tree 1.1 30/11/95 by Jordi Sanfeliu
# email: mikaku (at mark) fiwix.org
#
# Initial version: 1.0 30/11/95
# Next version : 1.1 24/02/97 Now, with symbolic links
# Patch by : Ian Kjos, to support unsearchable dirs
# email: beth13 (at mark) mail.utexas.edu
#
# Tree is a tool for view the directory tree (obvious :-) )
#
# ==> 'Tree' script used here with the permission of its author, Jordi
Sanfeliu.
# ==> Comments added by the author of this document.
# ==> Argument quoting added.
search () {
for dir in `echo *`
# ==> `echo *` lists all the files in current working directory,
without line breaks.
# ==> Similar effect to for dir in *
# ==> but "dir in `echo *`" will not handle filenames with blanks.
do
if [ -d "$dir" ] ; then # ==> If it is a directory (-d)...
zz=0 # ==> Temp variable, keeping track of directory level.
yy=`du -Ssh $dir | cut -f 1` # ==> Temp variable, keeping
track of spaced used by $dir
# xx=`cut -f 1 $yy`
while [ $zz != $deep ] # Keep track of inner nested loop.
do
echo -n "| " # ==> Display vertical connector symbol,
# ==> with 2 spaces & no line feed in order to
indent.
zz=`expr $zz + 1` # ==> Increment zz.
done
if [ -L "$dir" ] ; then # ==> If directory is a symbolic link...
echo "+---$dir" `ls -l $dir | sed 's/^.*'$dir' //'`
# ==> Display horiz. connector and list directory name, but...
# ==> delete date/time part of long listing.
else
echo "+---$dir -- $yy" # ==> Display horizontal connector
symbol...
# ==> and print directory name.
if cd "$dir" ; then # ==> If can move to subdirectory...
deep=`expr $deep + 1` # ==> Increment depth.
search # with recursivity ;-)
# ==> Function calls itself.
numdirs=`expr $numdirs + 1` # ==> Increment directory
count.
fi
fi
fi
done
cd .. # ==> Up one directory level.
if [ "$deep" ] ; then # ==> If depth = 0 (returns TRUE)...
swfi=1 # ==> set flag showing that search is done.
fi
deep=`expr $deep - 1` # ==> Decrement depth.
}
# - Main -
if [ $# = 0 ] ; then
cd `pwd` # ==> No args to script, then use current working directory.
else
cd $1 # ==> Otherwise, move to indicated directory.
fi
echo "Initial directory = `pwd`"
swfi=0 # ==> Search finished flag.
deep=0 # ==> Depth of listing.
numdirs=0
zz=0
while [ "$swfi" != 1 ] # While flag not set...
do
search # ==> Call function after initializing variables.
done
echo "Total directories = $numdirs"
exit 0
# ==> Challenge: try to figure out exactly how this script works.
------------------------------------------------------------------------------------------------------------------------
Rusty Waybrant wrote:
> If it is the newest BQ, there should be
> /usr/sausalito/db4/bin/db_checkpoint. This wouldn't be in a normal PATH,
> so you would have to add '/usr/sausalito/db4/bin/' to that command.
>
> There is also an script for any runlevel, /etc/rc.d/init.d/dbrecover
> (start|stop), that uses this tool.
>
>
> Rusty
>
> -----Original Message-----
> From: Gavin Nelmes-Crocker [mailto:gavin (at mark) web-hoster.co.uk]
> Sent: Thursday, March 16, 2006 5:45 AM
> To: coba-e (at mark) bluequartz.org
> Subject: [coba-e:04284] Re: Var directory filling up
>
>
>> You can try running this command:
>>
>> db_checkpoint -1 -h /var/db && db_archive -a -h /var/db | xargs rm -f
>>
>> That should remove the logs that are no longer needed... I remember
>> with the version I was running at the time (FC1+BQ) that I needed to
>> install a newer pwdb RPM. This issues seems to be resolved in newest BQ
>>
>
>
>> and CentOS.
>>
>
> Thanks Rusty, but....
>
> Strange we are running the latest BlueQuartz/Centos (as far as I can
> tell anyway - we use yum update to update)
>
> We don't have db_checkpoint installed which package is it part of, I've
> just looked at a genuine Raq550 which does have db_checkpoint installed
> and also interestingly the db directory is fairly empty on one
> log.number file there
> - is this a bug in Bluequartz or Centos? looks like BQ as I'm running
> pwdb-0.61.1-9BQ17 - is there a newer version - is db_checkpoint not
> installed?
>
> Note to anyone else - go check your /var partition it could be filling
> up if so find a way to clear it before mail stops!
>
> Regards
>
> Gavin
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.2.4/282 - Release Date: 3/15/2006
>
>
>
>
>
attatchment (text/x-vcard) ignored