]> granicus.if.org Git - strace/blob - strace-log-merge.1.in
mmap_cache: add function to enable mmap_cache
[strace] / strace-log-merge.1.in
1 .\" Copyright (c) 2017 The strace developers.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. The name of the author may not be used to endorse or promote products
13 .\"    derived from this software without specific prior written permission.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 .\"
26 .\" Required option.
27 .de OR
28 .  ie \\n(.$-1 \
29 .    RI "\fB\\$1\fP" "\ \\$2"
30 .  el \
31 .    BR "\\$1"
32 ..
33 .\"
34 .TH STRACE-LOG-MERGE 1 "@MANPAGE_DATE@" "strace @VERSION@"
35 .\"
36 .SH NAME
37 strace-log-merge \- merge strace \-ff \-tt output
38 .\"
39 .SH SYNOPSIS
40 .SY strace\-log\-merge
41 .IR STRACE_LOG
42 .YS
43 .SY strace\-log\-merge
44 .OR \-\-help
45 .YS
46 .\"
47 .SH DESCRIPTION
48 .B strace\-log\-merge
49 merges the output of
50 .B strace \-ff \-tt[t]
51 command, prepending PID to each line and sorting the result using time stamp as
52 a key.
53 .\"
54 .SH OPTIONS
55 .\"
56 .TP
57 .B \-\-help
58 Show program usage and exit.
59 .TP
60 .I STRACE_LOG
61 Output file name prefix of files produced by a
62 .B strace -ff -tt[t]
63 command.
64 .SH EXIT STATUS
65 .TP
66 .B 0
67 Success
68 .TP
69 .B Non-zero
70 Error occurred: either no argument specified (in that case a usage is printed),
71 or something went wrong during the processing of
72 .IR STRACE_LOG ".*"
73 files.
74 .\"
75 .SH USAGE EXAMPLE
76 .sp
77 .nf
78 .ft CW
79 $ strace -o sleepy -ff -tt -e trace=execve,nanosleep \\
80         sh -c 'sleep 0.1 & sleep 0.2 & sleep 0.3'
81 $ strace-log-merge sleepy | fold -w 72 -s
82 13475 21:13:52.040837 execve("/bin/sh", ["sh", "-c", "sleep 0.1 & sleep
83 0.2 & sleep 0."...], 0x7ffde54b2450 /* 33 vars */) = 0
84 13478 21:13:52.044050 execve("/bin/sleep", ["sleep", "0.3"],
85 0x5631be4f87a8 /* 33 vars */) = 0
86 13476 21:13:52.044269 execve("/bin/sleep", ["sleep", "0.1"],
87 0x5631be4f87a8 /* 33 vars */) = 0
88 13477 21:13:52.044389 execve("/bin/sleep", ["sleep", "0.2"],
89 0x5631be4f87a8 /* 33 vars */) = 0
90 13478 21:13:52.046207 nanosleep({tv_sec=0, tv_nsec=300000000}, NULL) = 0
91 13476 21:13:52.046303 nanosleep({tv_sec=0, tv_nsec=100000000}, NULL) = 0
92 13477 21:13:52.046318 nanosleep({tv_sec=0, tv_nsec=200000000}, NULL) = 0
93 13476 21:13:52.146852 +++ exited with 0 +++
94 13475 21:13:52.146942 --- SIGCHLD {si_signo=SIGCHLD,
95 si_code=CLD_EXITED, si_pid=13476, si_uid=1000, si_status=0, si_utime=0,
96 si_stime=0} ---
97 13477 21:13:52.247782 +++ exited with 0 +++
98 13475 21:13:52.247885 --- SIGCHLD {si_signo=SIGCHLD,
99 si_code=CLD_EXITED, si_pid=13477, si_uid=1000, si_status=0, si_utime=0,
100 si_stime=0} ---
101 13478 21:13:52.347680 +++ exited with 0 +++
102 13475 21:13:52.347786 --- SIGCHLD {si_signo=SIGCHLD,
103 si_code=CLD_EXITED, si_pid=13478, si_uid=1000, si_status=0, si_utime=0,
104 si_stime=0} ---
105 13475 21:13:52.348069 +++ exited with 0 +++
106 .ft R
107 .fi
108 .sp
109 .\"
110 .SH NOTES
111 .I strace-log-merge
112 does not work well with
113 .B strace
114 logs generated by
115 .B strace -tt
116 invocation that pass midnight, as those lack the information required
117 for the proper sorting.
118 Employing the
119 .B -ttt
120 option in the respective
121 .B strace
122 invocation should solve the problem.
123 .\"
124 .SH BUGS
125 .I strace-log-merge
126 does not perform any checks whether the files specified are in the correct
127 format and implies that only files from a single
128 .I strace
129 session match
130 .IR STRACE_LOG ".*"
131 glob pattern.
132 .\"
133 .SH HISTORY
134 The initial version of
135 .I strace-log-merge
136 was written by Denys Vlasenko in 2012.
137 .\"
138 .SH REPORTING BUGS
139 Problems with
140 .B strace-log-merge
141 should be reported to the
142 .B strace
143 mailing list at <strace\-devel@lists.strace.io>.
144 .\"
145 .SH "SEE ALSO"
146 .BR strace (1)