BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} BBOUT filles the filesystem
Henrik Olsen wrote:
> >-----Original Message-----
> > From: Dietmar Felmer
> > maybe one of You can help me to stop BBOUT increasing to fast an
> > filling the / filesystem (BBHOME=/opt/bb). The problem is that the
> > BBOUT file is always open when bbd runs (= all the time) and therefore
> > it can't be reduced.
> echo "" >BBOUT
> should work for truncating it even when held open by bbd.
On the Unixes I have worked on, if the file is being held open when it
is truncated, the process that has the open filehandle still keeps its
copy. It sometimes gets a deleted inode (so it won't show up in a "df"
listing -- very bad) and sometimes just returns to its previous size on
the next write() to the file. Sometimes, however, it just corrupts the
filesystem.
To test:
yes > foo.out &
SAVEPID=$!
sleep 2
ls -l foo.out
echo "" > foo.out
sleep 1
ls -l foo.out
kill $SAVEPID
On my machine, I get the following:
/scratch >yes > foo.out &
[1] 21118
/scratch >SAVEPID=$!
/scratch >sleep 2
/scratch >ls -l foo.out
-rw-r--r-- 1 jmoore mis 4198400 Feb 01 10:04 foo.out
/scratch >echo "" > foo.out
/scratch >sleep 1
/scratch >ls -l foo.out
-rw-r--r-- 1 jmoore mis 6529024 Feb 01 10:05 foo.out
/scratch >kill $SAVEPID
Notice that in the first 2 seconds, "yes" output 4 Mb of data. Then the
file is truncated. Unless "yes" got significantly faster during the
second sleep, the file was never truncated properly.
--Joe
--
IBM's vision is apparently to make IBM hardware "scream with Microsoft
software" --The Register,
http://www.theregister.co.uk/990927-000003.html
I have visions of screaming with (at and about) Microsoft software, too.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.
Home |
Main Index |
Thread Index