STRACE-LOG-MERGE(1)
๐ strace-log-merge(1) โ General Commands Manual ๐
okay bestie, gather round, because this little tool is lowkey the group-chat moderator for your strace logs and it deserves main character energy. โจ
๐ธ NAME ๐ธ
strace-log-merge โ merge strace -ff -tt output
๐ SYNOPSIS ๐
strace-log-merge STRACE_LOG
strace-log-merge --help
๐ฆ DESCRIPTION ๐ฆ
so basically strace-log-merge takes all the log files that a strace -ff -tt[t] command spat out and merges them into one glorious timeline. ๐
It does two things, and honestly? iconic behaviour:
- it prepends the Process ID (PID) to each line ๐
- it sorts the combined output chronologically by timestamp โฐ
like, it's giving "I put your chaotic multi-process logs in a sensible order." periodt.
โจ OPTIONS โจ
--helpโ shows you the program usage and then peaces out. simple. clean. we love.STRACE_LOGโ this is the file name prefix for the log files that came out of astrace -ff -tt[t]command. the utility will read all files matching theSTRACE_LOG.*pattern. yes, all of them. ๐ซถ
๐ EXIT STATUS ๐
0โ success! slay. everything worked. ๐- Non-zero โ something went wrong ๐ญ. this can happen because of a missing argument (in which case usage information gets printed) or because of a failure during the processing of the
STRACE_LOG.*files.
๐ USAGE EXAMPLE ๐
$ strace -o sleepy -ff -tt -e trace=execve,nanosleep \
sh -c 'sleep 0.1 & sleep 0.2 & sleep 0.3'
$ strace-log-merge sleepy | fold -w 72 -s
13475 21:13:52.040837 execve("/bin/sh", ["sh", "-c", "sleep 0.1 & sleep
0.2 & sleep 0."...], 0x7ffde54b2450 /* 33 vars */) = 0
13478 21:13:52.044050 execve("/bin/sleep", ["sleep", "0.3"],
0x5631be4f87a8 /* 33 vars */) = 0
13476 21:13:52.044269 execve("/bin/sleep", ["sleep", "0.1"],
0x5631be4f87a8 /* 33 vars */) = 0
13477 21:13:52.044389 execve("/bin/sleep", ["sleep", "0.2"],
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 +++
like look at that. every line got its PID kiss ๐ and the whole thing is in timestamp order. chef's kiss.
๐ NOTES ๐
heads up bestie, there's a little โจsituationโจ here.
strace-log-merge may fail to correctly sort logs that were generated with -tt and span across midnight. ๐ญ why? because the standard -tt timestamp lacks date information, and that date info is required for proper sorting. it literally cannot tell which day it is.
the fix? use the -ttt option with strace โ that solves this problem, because its timestamp format includes the date. so if your run might cross midnight, -ttt is the move. no cap. ๐
๐ BUGS ๐
strace-log-merge does not validate the format of the input files. ๐ it just assumes that every file matching the STRACE_LOG.* glob pattern is a correctly formatted log file from a single strace session. so if you feed it chaos, it will simply trust you. and that's a choice.
๐ง HISTORY ๐ง
the initial version of strace-log-merge was written by Denys Vlasenko in 2012. an actual legend. ๐
๐ REPORTING BUGS ๐
problems with strace-log-merge should be reported to the strace mailing list at <strace-devel@lists.strace.io>.
๐ธ SEE ALSO ๐ธ
and that's the whole page, bestie. this one's from strace 7.3, dated 2025-07-02 โ so go forth, merge those logs, and remember: don't cross midnight with plain -tt or the vibes will be off. ๐โจ
๐ฆ where this page comes from
- arch rolling: strace 7.3-1 ยท LGPL-2.1-or-later
- fedora 43: strace 7.3-1.fc43 ยท LGPL-2.1-or-later AND GPL-2.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND (GPL-1.0-or-later WITH Linux-syscall-note) AND (GPL-2.0-or-later WITH Linux-syscall-note) AND (GPL-2.0-only WITH Linux-syscall-note) AND (LGPL-2.0-or-later WITH Linux-syscall-note) AND (LGPL-2.1-or-later WITH Linux-syscall-note) AND ((GPL-2.0-only WITH Linux-syscall-note) OR Linux-OpenIB) AND ((GPL-2.0-only WITH Linux-syscall-note) OR MIT) AND ((GPL-2.0-or-later WITH Linux-syscall-note) OR BSD-3-Clause) AND ISC AND X11 AND FSFAP AND FSFUL AND FSFULLR AND FSFULLRWD
- fedora 44: strace 7.3-1.fc44 ยท LGPL-2.1-or-later AND GPL-2.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND (GPL-1.0-or-later WITH Linux-syscall-note) AND (GPL-2.0-or-later WITH Linux-syscall-note) AND (GPL-2.0-only WITH Linux-syscall-note) AND (LGPL-2.0-or-later WITH Linux-syscall-note) AND (LGPL-2.1-or-later WITH Linux-syscall-note) AND ((GPL-2.0-only WITH Linux-syscall-note) OR Linux-OpenIB) AND ((GPL-2.0-only WITH Linux-syscall-note) OR MIT) AND ((GPL-2.0-or-later WITH Linux-syscall-note) OR BSD-3-Clause) AND ISC AND X11 AND FSFAP AND FSFUL AND FSFULLR AND FSFULLRWD
- nixpkgs unstable: strace 7.3
- ๐ the page's license: LGPL-2.1-or-later
- Copyright (c) 2017-2025 The strace developers
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms