This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: limiting strace?, was: failure of unzip and recent cygwin1.dll


On Wed, 18 Feb 2004, Ross Boulet wrote:

> > On Mon, 16 Feb 2004, Thomas L Roche wrote:
> >
> > > Is there a way to limit the size of the strace output _file_, rather
> > > than just the output file buffer, while preserving desired
> > > information?
> > >
> > > I previously used strace to debug the problem that 20040213 induced
> > > in emacs 'desktop', therefore in emacs' startup; nevertheless the
> > > resulting strace.out was > 21 MB. Thus I am somewhat hesitant to
> > > avail myself of
> > >
> > > Christopher Faylor Sun, 15 Feb 2004 21:12:02 -0500
> > > > more strace output for the failing condition, meaning that if you do
> > > > this:
> > >
> > > >   strace -o strace.out unzip whatever
> > >
> > > > it should produce a large strace file.
> > >
> > > (quite the understatement :-) since
> > >
> > > * the unzip SEGVs typically occur after 30-60 min runtime
> > >
> > > * I have < 5 GB free space.
> > >
> > > Is there a way to limit the file size directly, or to script its
> > > rotation?
> > >
> > > Alternatively, is there a recommended mask setting that will preserve
> > > the desired information, while not blowing out my disk? I'm assuming
> > > 'malloc' would be part of the recommended setting: anything else?
> >
> > You're on Cygwin, man!  Use the scripting tools! :-)
> >
> > Don't forget that strace by default sends the trace to stdout.  You
> > can then pipe it to any program you wish (e.g., "tail -100", or "grep
> > -v ...", or a whole bunch of others).  You can then redirect the
> > output of the pipe chain to a file, if you wish...
> >       Igor
>
> Just adding my 2 cents and hopefully to learn something:
>
> I know how to use pipes but I don't know how they are handled "under the
> covers".  Wouldn't piping the strace to tail or grep still produce a
> temporary file of a large size?  I don't know if the original poster is
> concerned with disk space or only the output.  If it's a space issue and a
> temporary file is created for the pipe, I can see why he would want to limit
> the strace output directly.  If its just the result, it seems tail or grep
> would be good options.
>
> Ross

Pipes are direct process-to-process communication devices in most (all?)
modern operating systems.  Older systems (read: MS-DOS) didn't have true
pipes, and had to emulate them with redirection to temporary files.
AFAIK, Cygwin doesn't use temporary files for pipes on any of the systems
that it runs on.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]