Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 1 | .\" Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl> |
| 2 | .\" Copyright (c) 1993 Branko Lankester <branko@hacktic.nl> |
| 3 | .\" Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com> |
| 4 | .\" All rights reserved. |
| 5 | .\" |
| 6 | .\" Redistribution and use in source and binary forms, with or without |
| 7 | .\" modification, are permitted provided that the following conditions |
| 8 | .\" are met: |
| 9 | .\" 1. Redistributions of source code must retain the above copyright |
| 10 | .\" notice, this list of conditions and the following disclaimer. |
| 11 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| 12 | .\" notice, this list of conditions and the following disclaimer in the |
| 13 | .\" documentation and/or other materials provided with the distribution. |
| 14 | .\" 3. The name of the author may not be used to endorse or promote products |
| 15 | .\" derived from this software without specific prior written permission. |
| 16 | .\" |
| 17 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 18 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 19 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 20 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 21 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 22 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | .\" |
| 28 | .\" $Id$ |
| 29 | .\" |
| 30 | .de CW |
| 31 | .sp |
| 32 | .nf |
| 33 | .ft CW |
| 34 | .. |
| 35 | .de CE |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 36 | .ft R |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 37 | .fi |
| 38 | .sp |
| 39 | .. |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 40 | .TH STRACE 1 "2010-03-30" |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 41 | .SH NAME |
| 42 | strace \- trace system calls and signals |
| 43 | .SH SYNOPSIS |
| 44 | .B strace |
| 45 | [ |
Grant Edwards | 8a08277 | 2011-04-07 20:25:40 +0000 | [diff] [blame] | 46 | .B \-CdDffhiqrtttTvxxy |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 47 | ] |
| 48 | [ |
| 49 | .BI \-a column |
| 50 | ] |
| 51 | [ |
| 52 | .BI \-e expr |
| 53 | ] |
| 54 | \&... |
| 55 | [ |
| 56 | .BI \-o file |
| 57 | ] |
| 58 | [ |
| 59 | .BI \-p pid |
| 60 | ] |
| 61 | \&... |
| 62 | [ |
Grant Edwards | 8a08277 | 2011-04-07 20:25:40 +0000 | [diff] [blame] | 63 | .BI \-P path |
| 64 | ] |
| 65 | \&... |
| 66 | [ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 67 | .BI \-s strsize |
| 68 | ] |
| 69 | [ |
| 70 | .BI \-u username |
| 71 | ] |
| 72 | [ |
Roland McGrath | 4417fda | 2003-01-24 04:31:20 +0000 | [diff] [blame] | 73 | .BI \-E var=val |
| 74 | ] |
| 75 | \&... |
| 76 | [ |
| 77 | .BI \-E var |
| 78 | ] |
| 79 | \&... |
| 80 | [ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 81 | .I command |
| 82 | [ |
| 83 | .I arg |
| 84 | \&... |
| 85 | ] |
| 86 | ] |
| 87 | .sp |
| 88 | .B strace |
| 89 | .B \-c |
| 90 | [ |
Andreas Schwab | b87d30c | 2010-06-11 15:49:36 +0200 | [diff] [blame] | 91 | .B \-D |
| 92 | ] |
| 93 | [ |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 94 | .BI \-e expr |
| 95 | ] |
| 96 | \&... |
| 97 | [ |
| 98 | .BI \-O overhead |
| 99 | ] |
| 100 | [ |
| 101 | .BI \-S sortby |
| 102 | ] |
| 103 | [ |
| 104 | .I command |
| 105 | [ |
| 106 | .I arg |
| 107 | \&... |
| 108 | ] |
| 109 | ] |
| 110 | .SH DESCRIPTION |
| 111 | .IX "strace command" "" "\fLstrace\fR command" |
| 112 | .LP |
| 113 | In the simplest case |
| 114 | .B strace |
| 115 | runs the specified |
| 116 | .I command |
| 117 | until it exits. |
| 118 | It intercepts and records the system calls which are called |
| 119 | by a process and the signals which are received by a process. |
| 120 | The name of each system call, its arguments and its return value |
| 121 | are printed on standard error or to the file specified with the |
| 122 | .B \-o |
Roland McGrath | a09353a | 2008-12-10 06:09:29 +0000 | [diff] [blame] | 123 | option. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 124 | .LP |
| 125 | .B strace |
Nate Sammons | b4aa113 | 1999-03-31 05:59:04 +0000 | [diff] [blame] | 126 | is a useful diagnostic, instructional, and debugging tool. |
Roland McGrath | 0411b40 | 2003-10-22 06:16:32 +0000 | [diff] [blame] | 127 | System administrators, diagnosticians and trouble-shooters will find |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 128 | it invaluable for solving problems with |
| 129 | programs for which the source is not readily available since |
| 130 | they do not need to be recompiled in order to trace them. |
| 131 | Students, hackers and the overly-curious will find that |
| 132 | a great deal can be learned about a system and its system calls by |
| 133 | tracing even ordinary programs. And programmers will find that |
| 134 | since system calls and signals are events that happen at the user/kernel |
| 135 | interface, a close examination of this boundary is very |
| 136 | useful for bug isolation, sanity checking and |
| 137 | attempting to capture race conditions. |
| 138 | .LP |
| 139 | Each line in the trace contains the system call name, followed |
| 140 | by its arguments in parentheses and its return value. |
| 141 | An example from stracing the command ``cat /dev/null'' is: |
| 142 | .CW |
| 143 | open("/dev/null", O_RDONLY) = 3 |
| 144 | .CE |
| 145 | Errors (typically a return value of \-1) have the errno symbol |
| 146 | and error string appended. |
| 147 | .CW |
| 148 | open("/foo/bar", O_RDONLY) = -1 ENOENT (No such file or directory) |
| 149 | .CE |
| 150 | Signals are printed as a signal symbol and a signal string. |
| 151 | An excerpt from stracing and interrupting the command ``sleep 666'' is: |
| 152 | .CW |
| 153 | sigsuspend([] <unfinished ...> |
| 154 | --- SIGINT (Interrupt) --- |
| 155 | +++ killed by SIGINT +++ |
| 156 | .CE |
Jan Kratochvil | 14256a7 | 2008-09-12 08:44:30 +0000 | [diff] [blame] | 157 | If a system call is being executed and meanwhile another one is being called |
| 158 | from a different thread/process then |
| 159 | .B strace |
| 160 | will try to preserve the order of those events and mark the ongoing call as |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 161 | being |
| 162 | .IR unfinished . |
| 163 | When the call returns it will be marked as |
| 164 | .IR resumed . |
Jan Kratochvil | 14256a7 | 2008-09-12 08:44:30 +0000 | [diff] [blame] | 165 | .CW |
| 166 | [pid 28772] select(4, [3], NULL, NULL, NULL <unfinished ...> |
| 167 | [pid 28779] clock_gettime(CLOCK_REALTIME, {1130322148, 939977000}) = 0 |
| 168 | [pid 28772] <... select resumed> ) = 1 (in [3]) |
| 169 | .CE |
| 170 | Interruption of a (restartable) system call by a signal delivery is processed |
| 171 | differently as kernel terminates the system call and also arranges its |
| 172 | immediate reexecution after the signal handler completes. |
| 173 | .CW |
| 174 | read(0, 0x7ffff72cf5cf, 1) = ? ERESTARTSYS (To be restarted) |
| 175 | --- SIGALRM (Alarm clock) @ 0 (0) --- |
| 176 | rt_sigreturn(0xe) = 0 |
| 177 | read(0, ""..., 1) = 0 |
| 178 | .CE |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 179 | Arguments are printed in symbolic form with a passion. |
Roland McGrath | 0411b40 | 2003-10-22 06:16:32 +0000 | [diff] [blame] | 180 | This example shows the shell performing ``>>xyzzy'' output redirection: |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 181 | .CW |
| 182 | open("xyzzy", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3 |
| 183 | .CE |
| 184 | Here the three argument form of open is decoded by breaking down the |
| 185 | flag argument into its three bitwise-OR constituents and printing the |
| 186 | mode value in octal by tradition. Where traditional or native |
| 187 | usage differs from ANSI or POSIX, the latter forms are preferred. |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 188 | In some cases, |
| 189 | .B strace |
| 190 | output has proven to be more readable than the source. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 191 | .LP |
| 192 | Structure pointers are dereferenced and the members are displayed |
| 193 | as appropriate. In all cases arguments are formatted in the most C-like |
| 194 | fashion possible. |
| 195 | For example, the essence of the command ``ls \-l /dev/null'' is captured as: |
| 196 | .CW |
| 197 | lstat("/dev/null", {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0 |
| 198 | .CE |
| 199 | Notice how the `struct stat' argument is dereferenced and how each member is |
| 200 | displayed symbolically. In particular, observe how the st_mode member |
| 201 | is carefully decoded into a bitwise-OR of symbolic and numeric values. |
| 202 | Also notice in this example that the first argument to lstat is an input |
| 203 | to the system call and the second argument is an output. Since output |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 204 | arguments are not modified if the system call fails, arguments may not |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 205 | always be dereferenced. For example, retrying the ``ls \-l'' example |
| 206 | with a non-existent file produces the following line: |
| 207 | .CW |
| 208 | lstat("/foo/bar", 0xb004) = -1 ENOENT (No such file or directory) |
| 209 | .CE |
| 210 | In this case the porch light is on but nobody is home. |
| 211 | .LP |
| 212 | Character pointers are dereferenced and printed as C strings. |
| 213 | Non-printing characters in strings are normally represented by |
| 214 | ordinary C escape codes. |
| 215 | Only the first |
| 216 | .I strsize |
| 217 | (32 by default) bytes of strings are printed; |
| 218 | longer strings have an ellipsis appended following the closing quote. |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 219 | Here is a line from ``ls \-l'' where the |
| 220 | .B getpwuid |
| 221 | library routine is reading the password file: |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 222 | .CW |
| 223 | read(3, "root::0:0:System Administrator:/"..., 1024) = 422 |
| 224 | .CE |
| 225 | While structures are annotated using curly braces, simple pointers |
| 226 | and arrays are printed using square brackets with commas separating |
| 227 | elements. Here is an example from the command ``id'' on a system with |
| 228 | supplementary group ids: |
| 229 | .CW |
| 230 | getgroups(32, [100, 0]) = 2 |
| 231 | .CE |
| 232 | On the other hand, bit-sets are also shown using square brackets |
| 233 | but set elements are separated only by a space. Here is the shell |
| 234 | preparing to execute an external command: |
| 235 | .CW |
| 236 | sigprocmask(SIG_BLOCK, [CHLD TTOU], []) = 0 |
| 237 | .CE |
| 238 | Here the second argument is a bit-set of two signals, SIGCHLD and SIGTTOU. |
| 239 | In some cases the bit-set is so full that printing out the unset |
| 240 | elements is more valuable. In that case, the bit-set is prefixed by |
| 241 | a tilde like this: |
| 242 | .CW |
| 243 | sigprocmask(SIG_UNBLOCK, ~[], NULL) = 0 |
| 244 | .CE |
| 245 | Here the second argument represents the full set of all signals. |
| 246 | .SH OPTIONS |
| 247 | .TP 12 |
| 248 | .TP |
| 249 | .B \-c |
Roland McGrath | 4de04aa | 2004-08-31 07:47:47 +0000 | [diff] [blame] | 250 | Count time, calls, and errors for each system call and report a summary on |
| 251 | program exit. On Linux, this attempts to show system time (CPU time spent |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 252 | running in the kernel) independent of wall clock time. If |
| 253 | .B \-c |
| 254 | is used with |
| 255 | .B \-f |
| 256 | or |
| 257 | .B \-F |
| 258 | (below), only aggregate totals for all traced processes are kept. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 259 | .TP |
Dmitry V. Levin | e3a7ef5 | 2010-03-28 19:24:54 +0000 | [diff] [blame] | 260 | .B \-C |
| 261 | Like |
| 262 | .B \-c |
| 263 | but also print regular output while processes are running. |
| 264 | .TP |
Andreas Schwab | b87d30c | 2010-06-11 15:49:36 +0200 | [diff] [blame] | 265 | .B \-D |
| 266 | (Not available on SVR4 and FreeBSD.) |
| 267 | Run tracer process as a detached grandchild, not as parent of the |
| 268 | tracee. This reduces the visible effect of |
| 269 | .B strace |
| 270 | by keeping the tracee a direct child of the calling process. |
| 271 | .TP |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 272 | .B \-d |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 273 | Show some debugging output of |
| 274 | .B strace |
| 275 | itself on the standard error. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 276 | .TP |
| 277 | .B \-f |
| 278 | Trace child processes as they are created by currently traced |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 279 | processes as a result of the |
| 280 | .BR fork (2) |
Roland McGrath | 41c4822 | 2008-07-18 00:25:10 +0000 | [diff] [blame] | 281 | system call. |
| 282 | .IP |
| 283 | On non-Linux platforms the new process is |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 284 | attached to as soon as its pid is known (through the return value of |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 285 | .BR fork (2) |
| 286 | in the parent process). This means that such children may run |
| 287 | uncontrolled for a while (especially in the case of a |
| 288 | .BR vfork (2)), |
| 289 | until the parent is scheduled again to complete its |
| 290 | .RB ( v ) fork (2) |
Roland McGrath | 41c4822 | 2008-07-18 00:25:10 +0000 | [diff] [blame] | 291 | call. On Linux the child is traced from its first instruction with no delay. |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 292 | If the parent process decides to |
| 293 | .BR wait (2) |
| 294 | for a child that is currently |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 295 | being traced, it is suspended until an appropriate child process either |
| 296 | terminates or incurs a signal that would cause it to terminate (as |
| 297 | determined from the child's current signal disposition). |
Roland McGrath | 41c4822 | 2008-07-18 00:25:10 +0000 | [diff] [blame] | 298 | .IP |
| 299 | On SunOS 4.x the tracing of |
| 300 | .BR vfork s |
| 301 | is accomplished with some dynamic linking trickery. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 302 | .TP |
| 303 | .B \-ff |
| 304 | If the |
| 305 | .B \-o |
| 306 | .I filename |
| 307 | option is in effect, each processes trace is written to |
| 308 | .I filename.pid |
| 309 | where pid is the numeric process id of each process. |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 310 | This is incompatible with |
| 311 | .BR \-c , |
| 312 | since no per-process counts are kept. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 313 | .TP |
| 314 | .B \-F |
Roland McGrath | 41c4822 | 2008-07-18 00:25:10 +0000 | [diff] [blame] | 315 | This option is now obsolete and it has the same functionality as |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 316 | .BR \-f . |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 317 | .TP |
| 318 | .B \-h |
| 319 | Print the help summary. |
| 320 | .TP |
| 321 | .B \-i |
| 322 | Print the instruction pointer at the time of the system call. |
| 323 | .TP |
| 324 | .B \-q |
| 325 | Suppress messages about attaching, detaching etc. This happens |
| 326 | automatically when output is redirected to a file and the command |
| 327 | is run directly instead of attaching. |
| 328 | .TP |
| 329 | .B \-r |
| 330 | Print a relative timestamp upon entry to each system call. This |
| 331 | records the time difference between the beginning of successive |
| 332 | system calls. |
| 333 | .TP |
| 334 | .B \-t |
| 335 | Prefix each line of the trace with the time of day. |
| 336 | .TP |
| 337 | .B \-tt |
| 338 | If given twice, the time printed will include the microseconds. |
| 339 | .TP |
| 340 | .B \-ttt |
| 341 | If given thrice, the time printed will include the microseconds |
| 342 | and the leading portion will be printed as the number |
| 343 | of seconds since the epoch. |
| 344 | .TP |
| 345 | .B \-T |
| 346 | Show the time spent in system calls. This records the time |
| 347 | difference between the beginning and the end of each system call. |
| 348 | .TP |
| 349 | .B \-v |
| 350 | Print unabbreviated versions of environment, stat, termios, etc. |
| 351 | calls. These structures are very common in calls and so the default |
| 352 | behavior displays a reasonable subset of structure members. Use |
| 353 | this option to get all of the gory details. |
| 354 | .TP |
| 355 | .B \-V |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 356 | Print the version number of |
| 357 | .BR strace . |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 358 | .TP |
| 359 | .B \-x |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 360 | Print all non-ASCII strings in hexadecimal string format. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 361 | .TP |
| 362 | .B \-xx |
| 363 | Print all strings in hexadecimal string format. |
| 364 | .TP |
Grant Edwards | 8a08277 | 2011-04-07 20:25:40 +0000 | [diff] [blame] | 365 | .B \-y |
| 366 | Print paths associated with file descriptor arguments. |
| 367 | .TP |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 368 | .BI "\-a " column |
Wichert Akkerman | 4dc8a2a | 1999-12-23 14:20:14 +0000 | [diff] [blame] | 369 | Align return values in a specific column (default column 40). |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 370 | .TP |
| 371 | .BI "\-e " expr |
| 372 | A qualifying expression which modifies which events to trace |
| 373 | or how to trace them. The format of the expression is: |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 374 | .RS 15 |
| 375 | .IP |
| 376 | [\fIqualifier\fB=\fR][\fB!\fR]\fIvalue1\fR[\fB,\fIvalue2\fR]... |
| 377 | .RE |
| 378 | .IP |
| 379 | where |
| 380 | .I qualifier |
| 381 | is one of |
| 382 | .BR trace , |
| 383 | .BR abbrev , |
| 384 | .BR verbose , |
| 385 | .BR raw , |
| 386 | .BR signal , |
| 387 | .BR read , |
| 388 | or |
| 389 | .B write |
| 390 | and |
| 391 | .I value |
| 392 | is a qualifier-dependent symbol or number. The default |
| 393 | qualifier is |
| 394 | .BR trace . |
| 395 | Using an exclamation mark negates the set of values. For example, |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 396 | .BR \-e "\ " open |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 397 | means literally |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 398 | .BR \-e "\ " trace = open |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 399 | which in turn means trace only the |
| 400 | .B open |
| 401 | system call. By contrast, |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 402 | .BR \-e "\ " trace "=!" open |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 403 | means to trace every system call except |
| 404 | .BR open . |
| 405 | In addition, the special values |
| 406 | .B all |
| 407 | and |
| 408 | .B none |
| 409 | have the obvious meanings. |
| 410 | .IP |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 411 | Note that some shells use the exclamation point for history |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 412 | expansion even inside quoted arguments. If so, you must escape |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 413 | the exclamation point with a backslash. |
| 414 | .TP |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 415 | \fB\-e\ trace\fR=\fIset\fR |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 416 | Trace only the specified set of system calls. The |
| 417 | .B \-c |
| 418 | option is useful for determining which system calls might be useful |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 419 | to trace. For example, |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 420 | .BR trace = open,close,read,write |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 421 | means to only |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 422 | trace those four system calls. Be careful when making inferences |
| 423 | about the user/kernel boundary if only a subset of system calls |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 424 | are being monitored. The default is |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 425 | .BR trace = all . |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 426 | .TP |
Dmitry V. Levin | 1c3031b | 2011-01-14 17:17:20 +0000 | [diff] [blame] | 427 | .BR "\-e\ trace" = file |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 428 | Trace all system calls which take a file name as an argument. You |
| 429 | can think of this as an abbreviation for |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 430 | .BR "\-e\ trace" = open , stat , chmod , unlink ,... |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 431 | which is useful to seeing what files the process is referencing. |
| 432 | Furthermore, using the abbreviation will ensure that you don't |
| 433 | accidentally forget to include a call like |
| 434 | .B lstat |
| 435 | in the list. Betchya woulda forgot that one. |
| 436 | .TP |
Dmitry V. Levin | 1c3031b | 2011-01-14 17:17:20 +0000 | [diff] [blame] | 437 | .BR "\-e\ trace" = process |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 438 | Trace all system calls which involve process management. This |
| 439 | is useful for watching the fork, wait, and exec steps of a process. |
| 440 | .TP |
Dmitry V. Levin | 1c3031b | 2011-01-14 17:17:20 +0000 | [diff] [blame] | 441 | .BR "\-e\ trace" = network |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 442 | Trace all the network related system calls. |
| 443 | .TP |
Dmitry V. Levin | 1c3031b | 2011-01-14 17:17:20 +0000 | [diff] [blame] | 444 | .BR "\-e\ trace" = signal |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 445 | Trace all signal related system calls. |
| 446 | .TP |
Dmitry V. Levin | 1c3031b | 2011-01-14 17:17:20 +0000 | [diff] [blame] | 447 | .BR "\-e\ trace" = ipc |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 448 | Trace all IPC related system calls. |
| 449 | .TP |
Dmitry V. Levin | 1c3031b | 2011-01-14 17:17:20 +0000 | [diff] [blame] | 450 | .BR "\-e\ trace" = desc |
Roland McGrath | 2fe7b13 | 2005-07-05 03:25:35 +0000 | [diff] [blame] | 451 | Trace all file descriptor related system calls. |
| 452 | .TP |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 453 | \fB\-e\ abbrev\fR=\fIset\fR |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 454 | Abbreviate the output from printing each member of large structures. |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 455 | The default is |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 456 | .BR abbrev = all . |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 457 | The |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 458 | .B \-v |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 459 | option has the effect of |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 460 | .BR abbrev = none . |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 461 | .TP |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 462 | \fB\-e\ verbose\fR=\fIset\fR |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 463 | Dereference structures for the specified set of system calls. The |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 464 | default is |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 465 | .BR verbose = all . |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 466 | .TP |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 467 | \fB\-e\ raw\fR=\fIset\fR |
Roland McGrath | 0411b40 | 2003-10-22 06:16:32 +0000 | [diff] [blame] | 468 | Print raw, undecoded arguments for the specified set of system calls. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 469 | This option has the effect of causing all arguments to be printed |
| 470 | in hexadecimal. This is mostly useful if you don't trust the |
| 471 | decoding or you need to know the actual numeric value of an |
| 472 | argument. |
| 473 | .TP |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 474 | \fB\-e\ signal\fR=\fIset\fR |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 475 | Trace only the specified subset of signals. The default is |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 476 | .BR signal = all . |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 477 | For example, |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 478 | .B signal "=!" SIGIO |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 479 | (or |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 480 | .BR signal "=!" io ) |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 481 | causes SIGIO signals not to be traced. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 482 | .TP |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 483 | \fB\-e\ read\fR=\fIset\fR |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 484 | Perform a full hexadecimal and ASCII dump of all the data read from |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 485 | file descriptors listed in the specified set. For example, to see |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 486 | all input activity on file descriptors |
| 487 | .I 3 |
| 488 | and |
| 489 | .I 5 |
| 490 | use |
| 491 | \fB\-e\ read\fR=\fI3\fR,\fI5\fR. |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 492 | Note that this is independent from the normal tracing of the |
| 493 | .BR read (2) |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 494 | system call which is controlled by the option |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 495 | .BR -e "\ " trace = read . |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 496 | .TP |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 497 | \fB\-e\ write\fR=\fIset\fR |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 498 | Perform a full hexadecimal and ASCII dump of all the data written to |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 499 | file descriptors listed in the specified set. For example, to see |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 500 | all output activity on file descriptors |
| 501 | .I 3 |
| 502 | and |
| 503 | .I 5 |
| 504 | use |
| 505 | \fB\-e\ write\fR=\fI3\fR,\fI5\fR. |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 506 | Note that this is independent from the normal tracing of the |
| 507 | .BR write (2) |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 508 | system call which is controlled by the option |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 509 | .BR -e "\ " trace = write . |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 510 | .TP |
| 511 | .BI "\-o " filename |
| 512 | Write the trace output to the file |
| 513 | .I filename |
| 514 | rather than to stderr. |
| 515 | Use |
| 516 | .I filename.pid |
| 517 | if |
| 518 | .B \-ff |
| 519 | is used. |
| 520 | If the argument begins with `|' or with `!' then the rest of the |
| 521 | argument is treated as a command and all output is piped to it. |
| 522 | This is convenient for piping the debugging output to a program |
| 523 | without affecting the redirections of executed programs. |
| 524 | .TP |
| 525 | .BI "\-O " overhead |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 526 | Set the overhead for tracing system calls to |
| 527 | .I overhead |
| 528 | microseconds. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 529 | This is useful for overriding the default heuristic for guessing |
| 530 | how much time is spent in mere measuring when timing system calls using |
| 531 | the |
| 532 | .B \-c |
Roland McGrath | 0411b40 | 2003-10-22 06:16:32 +0000 | [diff] [blame] | 533 | option. The accuracy of the heuristic can be gauged by timing a given |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 534 | program run without tracing (using |
| 535 | .BR time (1)) |
| 536 | and comparing the accumulated |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 537 | system call time to the total produced using |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 538 | .BR \-c . |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 539 | .TP |
| 540 | .BI "\-p " pid |
| 541 | Attach to the process with the process |
| 542 | .SM ID |
| 543 | .I pid |
| 544 | and begin tracing. |
| 545 | The trace may be terminated |
| 546 | at any time by a keyboard interrupt signal (\c |
| 547 | .SM CTRL\s0-C). |
| 548 | .B strace |
| 549 | will respond by detaching itself from the traced process(es) |
| 550 | leaving it (them) to continue running. |
| 551 | Multiple |
| 552 | .B \-p |
| 553 | options can be used to attach to up to 32 processes in addition to |
| 554 | .I command |
| 555 | (which is optional if at least one |
| 556 | .B \-p |
| 557 | option is given). |
| 558 | .TP |
Grant Edwards | 8a08277 | 2011-04-07 20:25:40 +0000 | [diff] [blame] | 559 | .BI "\-P " path |
| 560 | Trace only system calls accessing |
| 561 | .I path. |
| 562 | Multiple |
| 563 | .B \-P |
| 564 | options can be used to specify up to 256 paths. |
| 565 | .TP |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 566 | .BI "\-s " strsize |
| 567 | Specify the maximum string size to print (the default is 32). Note |
| 568 | that filenames are not considered strings and are always printed in |
| 569 | full. |
| 570 | .TP |
| 571 | .BI "\-S " sortby |
| 572 | Sort the output of the histogram printed by the |
| 573 | .B \-c |
Roland McGrath | 0411b40 | 2003-10-22 06:16:32 +0000 | [diff] [blame] | 574 | option by the specified criterion. Legal values are |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 575 | .BR time , |
| 576 | .BR calls , |
| 577 | .BR name , |
| 578 | and |
| 579 | .B nothing |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 580 | (default is |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 581 | .BR time ). |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 582 | .TP |
| 583 | .BI "\-u " username |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 584 | Run command with the user \s-1ID\s0, group \s-2ID\s0, and |
| 585 | supplementary groups of |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 586 | .IR username . |
| 587 | This option is only useful when running as root and enables the |
| 588 | correct execution of setuid and/or setgid binaries. |
| 589 | Unless this option is used setuid and setgid programs are executed |
| 590 | without effective privileges. |
Roland McGrath | 4417fda | 2003-01-24 04:31:20 +0000 | [diff] [blame] | 591 | .TP |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 592 | \fB\-E\ \fIvar\fR=\fIval\fR |
Roland McGrath | 4417fda | 2003-01-24 04:31:20 +0000 | [diff] [blame] | 593 | Run command with |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 594 | .IR var = val |
Roland McGrath | 4417fda | 2003-01-24 04:31:20 +0000 | [diff] [blame] | 595 | in its list of environment variables. |
| 596 | .TP |
| 597 | .BI "\-E " var |
| 598 | Remove |
| 599 | .IR var |
| 600 | from the inherited list of environment variables before passing it on to |
| 601 | the command. |
Roland McGrath | a09353a | 2008-12-10 06:09:29 +0000 | [diff] [blame] | 602 | .SH DIAGNOSTICS |
| 603 | When |
| 604 | .I command |
| 605 | exits, |
| 606 | .B strace |
| 607 | exits with the same exit status. |
| 608 | If |
| 609 | .I command |
| 610 | is terminated by a signal, |
| 611 | .B strace |
| 612 | terminates itself with the same signal, so that |
| 613 | .B strace |
| 614 | can be used as a wrapper process transparent to the invoking parent process. |
| 615 | .LP |
| 616 | When using |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 617 | .BR \-p , |
Roland McGrath | a09353a | 2008-12-10 06:09:29 +0000 | [diff] [blame] | 618 | the exit status of |
| 619 | .B strace |
| 620 | is zero unless there was an unexpected error in doing the tracing. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 621 | .SH "SETUID INSTALLATION" |
| 622 | If |
| 623 | .B strace |
| 624 | is installed setuid to root then the invoking user will be able to |
| 625 | attach to and trace processes owned by any user. |
| 626 | In addition setuid and setgid programs will be executed and traced |
| 627 | with the correct effective privileges. |
| 628 | Since only users trusted with full root privileges should be allowed |
| 629 | to do these things, |
| 630 | it only makes sense to install |
| 631 | .B strace |
| 632 | as setuid to root when the users who can execute it are restricted |
| 633 | to those users who have this trust. |
| 634 | For example, it makes sense to install a special version of |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 635 | .B strace |
| 636 | with mode `rwsr-xr--', user |
| 637 | .B root |
| 638 | and group |
| 639 | .BR trace , |
| 640 | where members of the |
| 641 | .B trace |
| 642 | group are trusted users. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 643 | If you do use this feature, please remember to install |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 644 | a non-setuid version of |
| 645 | .B strace |
| 646 | for ordinary lusers to use. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 647 | .SH "SEE ALSO" |
Roland McGrath | 7f7f436 | 2005-12-02 03:59:35 +0000 | [diff] [blame] | 648 | .BR ltrace (1), |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 649 | .BR time (1), |
Roland McGrath | 7f7f436 | 2005-12-02 03:59:35 +0000 | [diff] [blame] | 650 | .BR ptrace (2), |
| 651 | .BR proc (5) |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 652 | .SH NOTES |
| 653 | It is a pity that so much tracing clutter is produced by systems |
| 654 | employing shared libraries. |
| 655 | .LP |
| 656 | It is instructive to think about system call inputs and outputs |
| 657 | as data-flow across the user/kernel boundary. Because user-space |
| 658 | and kernel-space are separate and address-protected, it is |
| 659 | sometimes possible to make deductive inferences about process |
| 660 | behavior using inputs and outputs as propositions. |
| 661 | .LP |
| 662 | In some cases, a system call will differ from the documented behavior |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 663 | or have a different name. For example, on System V-derived systems |
| 664 | the true |
| 665 | .BR time (2) |
| 666 | system call does not take an argument and the |
| 667 | .B stat |
| 668 | function is called |
| 669 | .B xstat |
| 670 | and takes an extra leading argument. These |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 671 | discrepancies are normal but idiosyncratic characteristics of the |
| 672 | system call interface and are accounted for by C library wrapper |
| 673 | functions. |
| 674 | .LP |
| 675 | On some platforms a process that has a system call trace applied |
| 676 | to it with the |
| 677 | .B \-p |
| 678 | option will receive a |
| 679 | .BR \s-1SIGSTOP\s0 . |
| 680 | This signal may interrupt a system call that is not restartable. |
| 681 | This may have an unpredictable effect on the process |
| 682 | if the process takes no action to restart the system call. |
| 683 | .SH BUGS |
| 684 | Programs that use the |
| 685 | .I setuid |
| 686 | bit do not have |
| 687 | effective user |
| 688 | .SM ID |
| 689 | privileges while being traced. |
| 690 | .LP |
| 691 | A traced process ignores |
| 692 | .SM SIGSTOP |
Nate Sammons | b4aa113 | 1999-03-31 05:59:04 +0000 | [diff] [blame] | 693 | except on SVR4 platforms. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 694 | .LP |
| 695 | A traced process which tries to block SIGTRAP will be sent a SIGSTOP |
| 696 | in an attempt to force continuation of tracing. |
| 697 | .LP |
| 698 | A traced process runs slowly. |
| 699 | .LP |
| 700 | Traced processes which are descended from |
| 701 | .I command |
| 702 | may be left running after an interrupt signal (\c |
| 703 | .SM CTRL\s0-C). |
| 704 | .LP |
| 705 | On Linux, exciting as it would be, tracing the init process is forbidden. |
| 706 | .LP |
| 707 | The |
| 708 | .B \-i |
| 709 | option is weakly supported. |
| 710 | .SH HISTORY |
| 711 | .B strace |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 712 | The original |
| 713 | .B strace |
| 714 | was written by Paul Kranenburg |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 715 | for SunOS and was inspired by its trace utility. |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 716 | The SunOS version of |
| 717 | .B strace |
| 718 | was ported to Linux and enhanced |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 719 | by Branko Lankester, who also wrote the Linux kernel support. |
Wichert Akkerman | 8829a55 | 1999-06-11 13:18:40 +0000 | [diff] [blame] | 720 | Even though Paul released |
| 721 | .B strace |
| 722 | 2.5 in 1992, |
| 723 | Branko's work was based on Paul's |
| 724 | .B strace |
| 725 | 1.5 release from 1991. |
| 726 | In 1993, Rick Sladkey merged |
| 727 | .B strace |
| 728 | 2.5 for SunOS and the second release of |
| 729 | .B strace |
| 730 | for Linux, added many of the features of |
| 731 | .BR truss (1) |
| 732 | from SVR4, and produced an |
| 733 | .B strace |
| 734 | that worked on both platforms. In 1994 Rick ported |
| 735 | .B strace |
| 736 | to SVR4 and Solaris and wrote the |
| 737 | automatic configuration support. In 1995 he ported |
| 738 | .B strace |
| 739 | to Irix |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 740 | and tired of writing about himself in the third person. |
Roland McGrath | 98a3ecf | 2008-08-28 23:41:57 +0000 | [diff] [blame] | 741 | .SH BUGS |
| 742 | The SIGTRAP signal is used internally by the kernel implementation of |
| 743 | system call tracing. When a traced process receives a SIGTRAP signal not |
| 744 | associated with tracing, strace will not report that signal correctly. |
| 745 | This signal is not normally used by programs, but could be via a hard-coded |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 746 | break instruction or via |
| 747 | .BR kill (2). |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 748 | .SH PROBLEMS |
| 749 | Problems with |
| 750 | .B strace |
Roland McGrath | 4a9b49a | 2003-01-14 23:40:55 +0000 | [diff] [blame] | 751 | should be reported via the Debian Bug Tracking System, |
| 752 | or to the |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 753 | .B strace |
Dmitry V. Levin | a7835e6 | 2010-03-31 17:26:49 +0000 | [diff] [blame] | 754 | mailing list at <strace\-devel@lists.sourceforge.net>. |