ptrace – process scheduling traces

bind –a #σ /dev


The process trace device is a replacement for the trace facility in proc(3) to report more information about process events.

The ptracectl admits the following requests:
size n
Set the size of the buffer to n entries. Before issuing this request tracing is not enabled.
trace pid value
Set the trace on or off for the process with the given pid.

The ptrace file reports an integral number of events when read. To avoid too much interference with scheduling, it does not block readers. When no more events are available the read returns an EOF indication, but the program is expected to poll the device for further events. This behavior mimics what proc(3) does with the trace interface.


ptrace(1), ptrace(2).

If the buffer size is too small, events will be discarded.

The reader must poll the trace device.

Copyright © 2024 Plan 9 Foundation. All rights reserved.