trace 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. .TH TRACE 1
  2. .SH NAME
  3. trace \- show (real-time) process behavior
  4. .SH SYNOPSIS
  5. .B trace
  6. [
  7. .B \-d
  8. .I profdev
  9. ]
  10. [
  11. .B \-v
  12. ]
  13. [
  14. .B \-w
  15. ]
  16. [pid ... ]
  17. .SH DESCRIPTION
  18. .I Trace
  19. displays the behavior of processes running on the machine. In its
  20. window it shows a time line for each traced process. Running
  21. processes are shown as colored blocks. When a process is scheduled as
  22. a real-time process, black up arrows indicate process releases, black
  23. down arrows indicate process deadlines, red down arrows indicate the
  24. process ran over its allotted scheduled time, and green down arrows to
  25. indicates a process yielded the processor before its deadline.
  26. Non-real-time processes do not have such release times and deadlines
  27. and no real-time information is shown for such processes.
  28. .PP
  29. Trace reads /proc/trace to retrieve trace events from the kernel
  30. scheduler. Trace events are binary data structures, which are
  31. generated by the kernel scheduler whenever a noteworthy event occurs.
  32. The
  33. .B \-d
  34. flag can be used to specify another trace file.
  35. .PP
  36. The
  37. .B \-v
  38. flag prints out the events as they are received from the event file.
  39. .PP
  40. The \-w
  41. flag makes
  42. .B trace
  43. open a new window for its display.
  44. .PP
  45. To enable process tracing echo the string "traceon" into
  46. /proc/<pid>/ctl. To disable tracing of a process echo "traceoff"
  47. in the control file. Trace enables tracing on all processes as specified
  48. by their
  49. .B pids
  50. .PP
  51. The following one-character commands are recognized by
  52. .BR trace :
  53. .TP
  54. .B +
  55. Zoom in by a factor of two,
  56. .TP
  57. .B -
  58. Zoom out by a factor of two,
  59. .TP
  60. .B p
  61. Pause or resume,
  62. .TP
  63. .B q
  64. Quit.
  65. .SH "SEE ALSO
  66. .IR proc (3)
  67. .SH FILES
  68. .TF
  69. .TP
  70. .B /proc/trace
  71. trace event file
  72. .TP
  73. .B /sys/include/trace.h
  74. trace event data structures
  75. .TP
  76. .SH SOURCE
  77. .B /sys/src/cmd/trace