]> git.saurik.com Git - apple/system_cmds.git/blame - lskq.tproj/lskq.1
system_cmds-790.30.1.tar.gz
[apple/system_cmds.git] / lskq.tproj / lskq.1
CommitLineData
9726c137
A
1.\" Copyright (c) 2015, Apple Inc. All rights reserved.
2.\"
3.Dd Apr 20, 2015
4.Dt lskq 1
5.Os "Mac OS X"
6.Sh NAME
7.Nm lskq
8.Nd display process kqueue state
9.Sh SYNOPSIS
10.Nm lskq
11.Op Fl vhe
12.Op Fl p Ar <pid> | Fl a
13.Sh DESCRIPTION
14The
15.Nm lskq
16command enumerates kqueues and registered kevents of running processes.
17.Sh OPTIONS
18.Pp
19.Bl -tag -width xxx
20.It Fl p Ar <pid>
21Show kqueues of process
22.Ar <pid> .
23.It Fl a
24Show kqueues for all running processes. Requires root.
25.It Fl v
26Verbose: show opaque user data and filter-specific extension fields.
27.It Fl e
28Ignore empty kqueues.
cf37c299
A
29.It Fl r
30Print fields in raw hex.
9726c137
A
31.It Fl h
32Show help and exit.
33.El
34.Sh OUTPUT
35.Nm lskq
36prints one line of output for each registered kevent, consisting of process,
37kqueue, and kevent information. For kqueues with no registered kevents, a single
38line is output with an ident of `-'. See
39.Xr kevent 2
40for field semantics. The output columns are:
41.Bl -tag -width xxxxxxxxxxxx
42.It command
43shortened process name.
44.It pid
45process identifier.
46.It kq
47file descriptor corresponding to kqueue, or ``wq'' for the special workq kqueue.
48.It kqst
49kqueue status bitmask.
50.Bl -tag -width xxxxxxx -compact
51.It Sy k
52kqueue is in a
53.Fn kevent*
54wait set (KQ_SLEEP).
55.It Sy s
56kqueue is in a
57.Fn select
58wait set (KQ_SEL).
59.It Sy 3 6 q
60Type of kevents on this kqueue: KEV32, KEV64, or KEV_QOS.
61.El
62.It ident
63kevent identifier. The meaning depends on the kevent filter specified. Where
64possible,
65.Nm lskq
66prints both numeric and symbolic names.
67.It filter
68kevent filter type (EVFILT_*).
69.It fdtype
70file descriptor type, for filters operating on file descriptors.
71.It fflags
72kevent filter flags bitmask. The meaning of each field depends on the filter type.
73.Bl -tag -width xxxxxxx -compact
74.Pp
75.It EVFILT_READ:
76.It Sy l
77NOTE_LOWAT
78.Pp
79.It EVFILT_MACHPORT:
80.It Sy r
81MACH_RCV_MSG
82.Pp
83.It EVFILT_VNODE:
84.It Sy d
85NOTE_DELETE
86.It Sy w
87NOTE_WRITE
88.It Sy e
89NOTE_EXTEND
90.It Sy a
91NOTE_ATTRIB
92.It Sy l
93NOTE_LINK
94.It Sy r
95NOTE_RENAME
96.It Sy v
97NOTE_REVOKE
98.Pp
99.It EVFILT_PROC:
100.It Sy x
101NOTE_EXIT
102.It Sy t
103NOTE_EXITSTATUS
cf37c299
A
104.It Sy d
105NOTE_EXIT_DETAIL
9726c137
A
106.It Sy f
107NOTE_FORK
108.It Sy e
109NOTE_EXEC
110.It Sy s
111NOTE_SIGNAL
112.It Sy r
113NOTE_REAP
114.Pp
115.It EVFILT_TIMER:
116.It Sy s u n
117NOTE_SECONDS, NOTE_USECONDS, NOTE_NSECONDS
118.It Sy a
119NOTE_ABSOLUTE
120.It Sy c
121NOTE_CRITICAL
122.It Sy b
123NOTE_BACKGROUND
124.It Sy l
125NOTE_LEEWAY
cf37c299
A
126.Pp
127.It EVFILT_USER:
128.It Sy t
129NOTE_TRIGGER
130.It Sy a
131NOTE_FFAND
132.It Sy o
133NOTE_FFOR
887d5eed
A
134.Pp
135.It EVFILT_WORKLOOP:
136.It Sy t w
137NOTE_WL_THREAD_REQUEST, NOTE_WL_SYNC_WAIT
138.It Sy !
139NOTE_WL_SYNC_WAKE
140.It Sy q
141NOTE_WL_UPDATE_QOS
142.It Sy O o
143NOTE_WL_UPDATE_OWNER, NOTE_WL_DISCOVER_OWNER
9726c137
A
144.El
145.It flags
146kevent generic flags bitmask.
147.Bl -tag -width xxxxxxx -compact
148.It Sy a
149EV_ADD
150.It Sy n
151EV_ENABLE
152.It Sy d
153EV_DISABLE
154.It Sy x
155EV_DELETE
cf37c299 156.Pp
9726c137
A
157.It Sy r
158EV_RECEIPT
159.It Sy 1
160EV_ONESHOT
161.It Sy c
162EV_CLEAR
cf37c299
A
163.It Sy s
164EV_DISPATCH
165.Pp
166.It Sy u
167EV_UDATA_SPECIFIC
168.It Sy p
169EV_FLAG0 (EV_POLL)
170.It Sy b
171EV_FLAG1 (EV_OOBAND)
9726c137
A
172.It Sy o
173EV_EOF
174.It Sy e
175EV_ERROR
176.El
177.It evst
178kevent status bitmask.
179.Bl -tag -width xxxxxxx -compact
180.It Sy a
cf37c299 181KN_ACTIVE (event has triggered)
9726c137 182.It Sy q
cf37c299 183KN_QUEUED (event has been added to the active list)
9726c137 184.It Sy d
cf37c299 185KN_DISABLED
9726c137 186.It Sy s
cf37c299
A
187KN_STAYQUEUED (event is marked as always-enqueued on the active list)
188.Pp
189.It Sy o
190KN_DROPPING
191.It Sy u
192KN_USEWAIT
193.It Sy c
194KN_ATTACHING
195.It Sy f
196KN_DEFERDROP
197.It Sy t
198KN_TOUCH
9726c137
A
199.El
200.It data
201Filter-specific data.
202.El
203.Pp
204If the
205.Fl v
206(verbose) option is specified, the opaque user-data field and further
207filter-specific extension fields are printed in raw hexadecimal.
208.Sh NOTES
209The output of
210.Nm lskq
211is not an atomic snapshot of system state. In cases where
212.Nm lskq
213is able to detect an inconsistency, a warning will be printed.
cf37c299
A
214.Pp
215Not all flags are symbolicated. Use
216.Fl r
217(raw mode) to inspect additional flags.
9726c137
A
218.Sh SEE ALSO
219.Xr kqueue 2 ,
220.Xr kevent 2 ,
221.Xr ddt 1 ,
222.Xr lsof 8 ,
223.Xr lsmp 1