Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

strace-log-merge.1.in 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. .\" Copyright (c) 2017 The strace developers.
  2. .\" All rights reserved.
  3. .\"
  4. .\" SPDX-License-Identifier: LGPL-2.1-or-later
  5. .\"
  6. .\" Required option.
  7. .de OR
  8. . ie \\n(.$-1 \
  9. . RI "\fB\\$1\fP" "\ \\$2"
  10. . el \
  11. . BR "\\$1"
  12. ..
  13. .\"
  14. .TH STRACE-LOG-MERGE 1 "@MANPAGE_DATE@" "strace @VERSION@"
  15. .\"
  16. .SH NAME
  17. strace-log-merge \- merge strace \-ff \-tt output
  18. .\"
  19. .SH SYNOPSIS
  20. .SY strace\-log\-merge
  21. .IR STRACE_LOG
  22. .YS
  23. .SY strace\-log\-merge
  24. .OR \-\-help
  25. .YS
  26. .\"
  27. .SH DESCRIPTION
  28. .B strace\-log\-merge
  29. merges the output of
  30. .B strace \-ff \-tt[t]
  31. command, prepending PID to each line and sorting the result using time stamp as
  32. a key.
  33. .\"
  34. .SH OPTIONS
  35. .\"
  36. .TP
  37. .B \-\-help
  38. Show program usage and exit.
  39. .TP
  40. .I STRACE_LOG
  41. Output file name prefix of files produced by a
  42. .B strace -ff -tt[t]
  43. command.
  44. .SH EXIT STATUS
  45. .TP
  46. .B 0
  47. Success
  48. .TP
  49. .B Non-zero
  50. Error occurred: either no argument specified (in that case a usage is printed),
  51. or something went wrong during the processing of
  52. .IR STRACE_LOG ".*"
  53. files.
  54. .\"
  55. .SH USAGE EXAMPLE
  56. .sp
  57. .nf
  58. .ft CW
  59. $ strace -o sleepy -ff -tt -e trace=execve,nanosleep \\
  60. sh -c 'sleep 0.1 & sleep 0.2 & sleep 0.3'
  61. $ strace-log-merge sleepy | fold -w 72 -s
  62. 13475 21:13:52.040837 execve("/bin/sh", ["sh", "-c", "sleep 0.1 & sleep
  63. 0.2 & sleep 0."...], 0x7ffde54b2450 /* 33 vars */) = 0
  64. 13478 21:13:52.044050 execve("/bin/sleep", ["sleep", "0.3"],
  65. 0x5631be4f87a8 /* 33 vars */) = 0
  66. 13476 21:13:52.044269 execve("/bin/sleep", ["sleep", "0.1"],
  67. 0x5631be4f87a8 /* 33 vars */) = 0
  68. 13477 21:13:52.044389 execve("/bin/sleep", ["sleep", "0.2"],
  69. 0x5631be4f87a8 /* 33 vars */) = 0
  70. 13478 21:13:52.046207 nanosleep({tv_sec=0, tv_nsec=300000000}, NULL) = 0
  71. 13476 21:13:52.046303 nanosleep({tv_sec=0, tv_nsec=100000000}, NULL) = 0
  72. 13477 21:13:52.046318 nanosleep({tv_sec=0, tv_nsec=200000000}, NULL) = 0
  73. 13476 21:13:52.146852 +++ exited with 0 +++
  74. 13475 21:13:52.146942 --- SIGCHLD {si_signo=SIGCHLD,
  75. si_code=CLD_EXITED, si_pid=13476, si_uid=1000, si_status=0, si_utime=0,
  76. si_stime=0} ---
  77. 13477 21:13:52.247782 +++ exited with 0 +++
  78. 13475 21:13:52.247885 --- SIGCHLD {si_signo=SIGCHLD,
  79. si_code=CLD_EXITED, si_pid=13477, si_uid=1000, si_status=0, si_utime=0,
  80. si_stime=0} ---
  81. 13478 21:13:52.347680 +++ exited with 0 +++
  82. 13475 21:13:52.347786 --- SIGCHLD {si_signo=SIGCHLD,
  83. si_code=CLD_EXITED, si_pid=13478, si_uid=1000, si_status=0, si_utime=0,
  84. si_stime=0} ---
  85. 13475 21:13:52.348069 +++ exited with 0 +++
  86. .ft R
  87. .fi
  88. .sp
  89. .\"
  90. .SH NOTES
  91. .I strace-log-merge
  92. does not work well with
  93. .B strace
  94. logs generated by
  95. .B strace -tt
  96. invocation that pass midnight, as those lack the information required
  97. for the proper sorting.
  98. Employing the
  99. .B -ttt
  100. option in the respective
  101. .B strace
  102. invocation should solve the problem.
  103. .\"
  104. .SH BUGS
  105. .I strace-log-merge
  106. does not perform any checks whether the files specified are in the correct
  107. format and implies that only files from a single
  108. .I strace
  109. session match
  110. .IR STRACE_LOG ".*"
  111. glob pattern.
  112. .\"
  113. .SH HISTORY
  114. The initial version of
  115. .I strace-log-merge
  116. was written by Denys Vlasenko in 2012.
  117. .\"
  118. .SH REPORTING BUGS
  119. Problems with
  120. .B strace-log-merge
  121. should be reported to the
  122. .B strace
  123. mailing list at <strace\-devel@lists.strace.io>.
  124. .\"
  125. .SH "SEE ALSO"
  126. .BR strace (1)