ratrace 1.2 KB

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