[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Memory leakage



on Wed, Jan 03, 2001 at 09:06:16PM -0500, Antonio Rodriguez (arodriguez@worldnet.att.net) wrote:
> 
> 
> kmself@ix.netcom.com wrote:
> 
> 
> > 
> > Try the following on each of your mounted partitions, starting at the
> > mount point:
> > 
> >     $ du -sx * | sort -nr | cat -n | less
> > 
> > ...which will list out your largest directories, with usage sumarized,
> > in size order.  Track down where the storage seems to be going.
> > 
> 
> Thanks a lot. Following your indication I was able to determine what the
> problem was: About 2 weeks ago I had changed my /etc/ppp/options file,
> uncommenting debug and writting kdebug 7 (!!!)
> So, du -sx etcetera took me right away to
> /var/log, where I found 
> syslog 685016
> debug 684696
> kern.log 684592
> 
> rm them, rebooted and got back 2 gigs of space!
           ^^^^^^^^
Not necessary.

Rather:

    $ fuser -v bigfile		# show process(es) using bigfile
    $ fuser -vk bigfile		# kill process(es) using bigfile
    $ fuser -v bigfile		# verify the kill worked
    $ cat /dev/null > bigfile	# "empty" the file
    $ rm bigfile

In general, you want to *empty* a file (cat /dev/null > file) before you
delete it, and you don't want to delete an open file.

> Lesson: BE very carefull implementing kdebug level 7 in /etc/ppp/options

You might also want to look at logrotate's options, which should manage
this for you.


-- 
Karsten M. Self <kmself@ix.netcom.com>    http://kmself.home.netcom.com/
 Evangelist, Zelerate, Inc.                      http://www.zelerate.org
  What part of "Gestalt" don't you understand?      There is no K5 cabal
   http://gestalt-system.sourceforge.net/        http://www.kuro5hin.org

Attachment: pgpAHwIbEBOtk.pgp
Description: PGP signature


Reply to: