shithub: riscv

ref: 8dfdc38f952b708732e605641bd9cc64b126cbdc
dir: /sys/man/1/trace/

View raw version
.TH TRACE 1
.SH NAME
trace \- show (real-time) process behavior
.SH SYNOPSIS
.B trace
[
.B -d
.I file
]
[
.B -v
]
[
.B -w
]
[
.I pid
\&...
]
.SH DESCRIPTION
.I Trace
displays the behavior of processes running on the machine.  In its
window it shows a time line for each traced process.  Running
processes appear as colored blocks, with arrows marking important
events in real-time processes
(see
.IR proc (3)).
Black up arrows mark process releases,
black down arrows mark process deadlines,
green down arrows mark times when a process yielded the processor
before its deadline,
red down arrows mark times when the process overran its allotted time.
.PP
.I Trace
reads
.B /proc/trace
to retrieve trace events from the kernel
scheduler.  Trace events are binary data structures generated by
the kernel scheduler.
It is assumed that the reader of
.B /proc/trace
and the kernel providing it have the same byte order.
.PP
The options are:
.TP
.B -d
specify an alternate trace event file
.TP
.B -v
print events as they are read from the trace event file
.TP
.B -w
run in a new window rather than using the current one
.PD
.PP
.I Trace
recognizes these keystroke commands while it is running:
.TP
.B +
zoom in by a factor of two
.TP
.B -
zoom out by a factor of two
.TP
.B p
pause or resume
.TP
.B q
quit
.PD
.PP
.SH SEE ALSO
.IR proc (3)
.SH FILES
.TF /sys/include/trace.h
.TP
.B /proc/trace
trace event file
.TP
.B /sys/include/trace.h
trace event data structures
.PD
.SH SOURCE
.B /sys/src/cmd/trace.c