]> git.saurik.com Git - apple/system_cmds.git/blame - lskq.tproj/lskq.1
system_cmds-880.100.5.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
c0bbac3a
A
98.It Sy u
99NOTE_FUNLOCK
9726c137
A
100.Pp
101.It EVFILT_PROC:
102.It Sy x
103NOTE_EXIT
104.It Sy t
105NOTE_EXITSTATUS
cf37c299
A
106.It Sy d
107NOTE_EXIT_DETAIL
9726c137
A
108.It Sy f
109NOTE_FORK
110.It Sy e
111NOTE_EXEC
112.It Sy s
113NOTE_SIGNAL
114.It Sy r
115NOTE_REAP
116.Pp
117.It EVFILT_TIMER:
d52496fd
A
118.It Sy s u n m
119NOTE_SECONDS, NOTE_USECONDS, NOTE_NSECONDS, NOTE_MACHTIME
120.It Sy a A
121NOTE_ABSOLUTE, NOTE_MACH_CONTINUOUS_TIME
9726c137
A
122.It Sy c
123NOTE_CRITICAL
124.It Sy b
125NOTE_BACKGROUND
126.It Sy l
127NOTE_LEEWAY
cf37c299
A
128.Pp
129.It EVFILT_USER:
130.It Sy t
131NOTE_TRIGGER
132.It Sy a
133NOTE_FFAND
134.It Sy o
135NOTE_FFOR
887d5eed
A
136.Pp
137.It EVFILT_WORKLOOP:
d52496fd
A
138.It Sy t w i
139NOTE_WL_THREAD_REQUEST, NOTE_WL_SYNC_WAIT, NOTE_WL_SYNC_IPC
140.It Sy W
887d5eed
A
141NOTE_WL_SYNC_WAKE
142.It Sy q
143NOTE_WL_UPDATE_QOS
d52496fd
A
144.It Sy o
145NOTE_WL_DISCOVER_OWNER
146.It Sy e
147NOTE_WL_IGNORE_ESTALE
9726c137
A
148.El
149.It flags
150kevent generic flags bitmask.
151.Bl -tag -width xxxxxxx -compact
152.It Sy a
153EV_ADD
154.It Sy n
155EV_ENABLE
156.It Sy d
157EV_DISABLE
158.It Sy x
159EV_DELETE
cf37c299 160.Pp
9726c137
A
161.It Sy r
162EV_RECEIPT
163.It Sy 1
164EV_ONESHOT
165.It Sy c
166EV_CLEAR
cf37c299
A
167.It Sy s
168EV_DISPATCH
169.Pp
170.It Sy u
171EV_UDATA_SPECIFIC
172.It Sy p
173EV_FLAG0 (EV_POLL)
174.It Sy b
175EV_FLAG1 (EV_OOBAND)
9726c137
A
176.It Sy o
177EV_EOF
178.It Sy e
179EV_ERROR
180.El
181.It evst
182kevent status bitmask.
183.Bl -tag -width xxxxxxx -compact
184.It Sy a
cf37c299 185KN_ACTIVE (event has triggered)
9726c137 186.It Sy q
cf37c299 187KN_QUEUED (event has been added to the active list)
9726c137 188.It Sy d
d52496fd
A
189KN_DISABLED (knote is disabled)
190.It Sy p
191KN_SUPPRESSED (event delivery is in flight)
9726c137 192.It Sy s
d52496fd 193KN_STAYACTIVE (event is marked as always-enqueued on the active list)
cf37c299 194.Pp
639dadd6 195.It Sy d
d52496fd
A
196KN_DROPPING (knote is about to be dropped)
197.It Sy l
198KN_LOCKED (knote is locked)
199.It Sy P
200KN_POSTING (knote is being posted)
201.It Sy m
202KN_MERGE_QOS (knote is in override saturating mode)
639dadd6 203.Pp
d52496fd
A
204.It Sy D
205KN_DEFERDELETE (knote is waiting for deferred-delete ack)
639dadd6
A
206.It Sy v
207KN_REQVANISH
208.It Sy n
209KN_VANISHED
9726c137 210.El
639dadd6
A
211.It qos
212The QoS requested for the knote.
9726c137
A
213.It data
214Filter-specific data.
215.El
216.Pp
217If the
218.Fl v
219(verbose) option is specified, the opaque user-data field and further
220filter-specific extension fields are printed in raw hexadecimal.
221.Sh NOTES
222The output of
223.Nm lskq
224is not an atomic snapshot of system state. In cases where
225.Nm lskq
226is able to detect an inconsistency, a warning will be printed.
cf37c299
A
227.Pp
228Not all flags are symbolicated. Use
229.Fl r
230(raw mode) to inspect additional flags.
9726c137
A
231.Sh SEE ALSO
232.Xr kqueue 2 ,
233.Xr kevent 2 ,
234.Xr ddt 1 ,
235.Xr lsof 8 ,
236.Xr lsmp 1