tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tsirkin Evgeny <tsir...@gmail.com>
Subject Re: Clearing the catalina.out file
Date Sun, 16 Aug 2009 07:19:26 GMT
George ,your observations are still correct for truncating file. At least at
Sun OS
(Solaris) 9.If you truncate catalina.out :
echo -n > catalina.out
you will see the file becoming 0 bytes long .But once tomcat writes another
byte
into output it will become the same size it was before truncation.
I guess that either jvm or Solaris holds not only the file open for writing
but also
remembers it's seek  in the file (or maybe it is the same on Solaris).
Thus,once tomcat starts writing into file after truncate it writes starting
from the
end of file *he* thinks it is at and the file's size is restored .
(Yes that is tried on practice)
Maybe Linux behaves differently.
So,we are using swallowOutput and actually have no other options except
maybe
restarting the server .
(Note : restarting the server sometime is not an option on production )
Thanks
Evgeny

On Fri, Aug 14, 2009 at 9:57 PM, George Sexton <georges@mhsoftware.com>wrote:

> rm catalina.out
>
> You're right. He truncated it.
>
> It looks like neither one of us is reading the entire message. I said if
> you erase the file, it's held open. This is accurate. He responded with a
> way of truncating the file, and that works too.
>
> George Sexton
> MH Software, Inc.
> http://www.mhsoftware.com/
> Voice: 303 438 9585
>
>
> > -----Original Message-----
> > From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
> > Sent: Friday, August 14, 2009 12:46 PM
> > To: Tomcat Users List
> > Subject: RE: Clearing the catalina.out file
> >
> > > From: George Sexton [mailto:georges@mhsoftware.com]
> > > Subject: RE: Clearing the catalina.out file
> > >
> > > On one of my production servers, I erased catalina.out.
> >
> > Exactly how?  What's been under discussion here is a truncation
> > operation, not an unlink.
> >
> >  - Chuck
> >
> >
> > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
> > PROPRIETARY MATERIAL and is thus for use only by the intended
> > recipient. If you received this in error, please contact the sender and
> > delete the e-mail and its attachments from all computers.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message