ratrace 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. .TH RATRACE 1
  2. .SH NAME
  3. ratrace \- trace process system calls
  4. .SH SYNOPSIS
  5. .B ratrace
  6. [
  7. .I -o outputfile
  8. ] | [
  9. .I pid
  10. ] | [
  11. .I -c command
  12. ]
  13. .SH DESCRIPTION
  14. .I Ratrace
  15. shows the system calls executed by a process,
  16. either the one with
  17. .I pid
  18. or a fresh invocation of
  19. .IR command .
  20. .PP
  21. Trace output is determined by the kernel, not
  22. .IR ratrace .
  23. Certain fixed rules apply.
  24. The first four fields of the output are
  25. pid, text name, system call name, and the PC of the user program.
  26. Data is always printed as
  27. .IB pointer /\c
  28. "\fIstring\fP",
  29. where the
  30. .I string
  31. is the first 32 bytes of the data, with
  32. .L \&.
  33. replacing non-printing ASCII characters
  34. (printing characters are those between ASCII space (SP) and delete (DEL), exclusive).
  35. Return values follow an
  36. .LR = ,
  37. and include the integer return value,
  38. the
  39. .I errstr
  40. (with "" if there is no
  41. .IR errstr ),
  42. and
  43. the start and stop times for the system call in nanoseconds.
  44. The times are exclusive of the overhead for tracing.
  45. .SH FILES
  46. .BI /proc/ pid /syscall
  47. .br
  48. .BI /proc/ pid /ctl
  49. .SH SOURCE
  50. .B /sys/src/cmd/ratrace.c
  51. .SH "SEE ALSO"
  52. .IR acid (1),
  53. .IR db (1),
  54. .IR proc (3)
  55. .SH BUGS
  56. The printing of the data is too limited in length;
  57. printing
  58. .L \&.
  59. instead of something more sensible is limiting.