man-pages/man1/strace-log-merge.1.html
2021-03-31 01:06:50 +01:00

196 lines
4.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of STRACE-LOG-MERGE</TITLE>
</HEAD><BODY>
<H1>STRACE-LOG-MERGE</H1>
Section: User Commands (1)<BR>Updated: 2020-02-04<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
strace-log-merge - merge strace -ff -tt output
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<I>STRACE_LOG</I>
<B>--help</B><I>&nbsp;</I>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>strace-log-merge</B>
merges the output of
<B>strace -ff -tt[t]</B>
command, prepending PID to each line and sorting the result using time stamp as
a key.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>--help</B>
<DD>
Show program usage and exit.
<DT id="2"><I>STRACE_LOG</I>
<DD>
Output file name prefix of files produced by a
<B>strace -ff -tt[t]</B>
command.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>EXIT STATUS</H2>
<DL COMPACT>
<DT id="3"><B>0</B>
<DD>
Success
<DT id="4"><B>Non-zero</B>
<DD>
Error occurred: either no argument specified (in that case a usage is printed),
or something went wrong during the processing of
<I>STRACE_LOG</I>.*
files.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>USAGE EXAMPLE</H2>
<P>
<PRE>
$ strace -o sleepy -ff -tt -e trace=execve,nanosleep \
sh -c 'sleep 0.1 &amp; sleep 0.2 &amp; sleep 0.3'
$ strace-log-merge sleepy | fold -w 72 -s
13475 21:13:52.040837 execve(&quot;/bin/sh&quot;, [&quot;sh&quot;, &quot;-c&quot;, &quot;sleep 0.1 &amp; sleep
0.2 &amp; sleep 0.&quot;...], 0x7ffde54b2450 /* 33 vars */) = 0
13478 21:13:52.044050 execve(&quot;/bin/sleep&quot;, [&quot;sleep&quot;, &quot;0.3&quot;],
0x5631be4f87a8 /* 33 vars */) = 0
13476 21:13:52.044269 execve(&quot;/bin/sleep&quot;, [&quot;sleep&quot;, &quot;0.1&quot;],
0x5631be4f87a8 /* 33 vars */) = 0
13477 21:13:52.044389 execve(&quot;/bin/sleep&quot;, [&quot;sleep&quot;, &quot;0.2&quot;],
0x5631be4f87a8 /* 33 vars */) = 0
13478 21:13:52.046207 nanosleep({tv_sec=0, tv_nsec=300000000}, NULL) = 0
13476 21:13:52.046303 nanosleep({tv_sec=0, tv_nsec=100000000}, NULL) = 0
13477 21:13:52.046318 nanosleep({tv_sec=0, tv_nsec=200000000}, NULL) = 0
13476 21:13:52.146852 +++ exited with 0 +++
13475 21:13:52.146942 --- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=13476, si_uid=1000, si_status=0, si_utime=0,
si_stime=0} ---
13477 21:13:52.247782 +++ exited with 0 +++
13475 21:13:52.247885 --- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=13477, si_uid=1000, si_status=0, si_utime=0,
si_stime=0} ---
13478 21:13:52.347680 +++ exited with 0 +++
13475 21:13:52.347786 --- SIGCHLD {si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=13478, si_uid=1000, si_status=0, si_utime=0,
si_stime=0} ---
13475 21:13:52.348069 +++ exited with 0 +++
</PRE>
<P>
<A NAME="lbAH">&nbsp;</A>
<H2>NOTES</H2>
<I>strace-log-merge</I>
does not work well with
<B>strace</B>
logs generated by
<B>strace -tt</B>
invocation that pass midnight, as those lack the information required
for the proper sorting.
Employing the
<B>-ttt</B>
option in the respective
<B>strace</B>
invocation should solve the problem.
<A NAME="lbAI">&nbsp;</A>
<H2>BUGS</H2>
<I>strace-log-merge</I>
does not perform any checks whether the files specified are in the correct
format and implies that only files from a single
<I>strace</I>
session match
<I>STRACE_LOG</I>.*
glob pattern.
<A NAME="lbAJ">&nbsp;</A>
<H2>HISTORY</H2>
The initial version of
<I>strace-log-merge</I>
was written by Denys Vlasenko in 2012.
<A NAME="lbAK">&nbsp;</A>
<H2>REPORTING BUGS</H2>
Problems with
<B>strace-log-merge</B>
should be reported to the
<B>strace</B>
mailing list at &lt;<A HREF="mailto:strace-devel@lists.strace.io">strace-devel@lists.strace.io</A>&gt;.
<A NAME="lbAL">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+strace">strace</A></B>(1)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="5"><A HREF="#lbAB">NAME</A><DD>
<DT id="6"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="7"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="8"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="9"><A HREF="#lbAF">EXIT STATUS</A><DD>
<DT id="10"><A HREF="#lbAG">USAGE EXAMPLE</A><DD>
<DT id="11"><A HREF="#lbAH">NOTES</A><DD>
<DT id="12"><A HREF="#lbAI">BUGS</A><DD>
<DT id="13"><A HREF="#lbAJ">HISTORY</A><DD>
<DT id="14"><A HREF="#lbAK">REPORTING BUGS</A><DD>
<DT id="15"><A HREF="#lbAL">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:27 GMT, March 31, 2021
</BODY>
</HTML>