WS(3) WS(3)
NAME
ws - wait statistics
SYNOPSIS
bind -a #W /dev
/dev/wsctl
/dev/wsdata
DESCRIPTION
Ws collects wait statistics for individual locks, slocks,
and qlocks. A slock entry tracks the time spent acquiring
the lock inside a QLock or RWLock while a qlock tracks the
time waiting on the scheduling queue for a qlock(2)d (or
wlock, etc.) lock to become available. The statistics col-
lected are the number of lock events, the maximum wait
cycles, and the cumulative wait cycles. The cycles are
counted as cycles (see cputime(2)).
The ctl file takes the following commands:
start start data collection,
stop stop data collection, and
clear forget collected data.
The data file is suitable for parsing with getfields(2) and
has 5 fields per wait: type, program counter, count, maximum
wait, and cumulative wait. Fields are space seperated, and
records end with a newline.
SOURCE
/sys/src/nix/port/devws.c
SEE ALSO
wsprint(8)
BUGS
The naming conventions are confusing.
Page 1 Plan 9 (printed 12/14/25)