]>
Commit | Line | Data |
---|---|---|
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 | |
14 | The | |
15 | .Nm lskq | |
16 | command enumerates kqueues and registered kevents of running processes. | |
17 | .Sh OPTIONS | |
18 | .Pp | |
19 | .Bl -tag -width xxx | |
20 | .It Fl p Ar <pid> | |
21 | Show kqueues of process | |
22 | .Ar <pid> . | |
23 | .It Fl a | |
24 | Show kqueues for all running processes. Requires root. | |
25 | .It Fl v | |
26 | Verbose: show opaque user data and filter-specific extension fields. | |
27 | .It Fl e | |
28 | Ignore empty kqueues. | |
cf37c299 A |
29 | .It Fl r |
30 | Print fields in raw hex. | |
9726c137 A |
31 | .It Fl h |
32 | Show help and exit. | |
33 | .El | |
34 | .Sh OUTPUT | |
35 | .Nm lskq | |
36 | prints one line of output for each registered kevent, consisting of process, | |
37 | kqueue, and kevent information. For kqueues with no registered kevents, a single | |
38 | line is output with an ident of `-'. See | |
39 | .Xr kevent 2 | |
40 | for field semantics. The output columns are: | |
41 | .Bl -tag -width xxxxxxxxxxxx | |
42 | .It command | |
43 | shortened process name. | |
44 | .It pid | |
45 | process identifier. | |
46 | .It kq | |
47 | file descriptor corresponding to kqueue, or ``wq'' for the special workq kqueue. | |
48 | .It kqst | |
49 | kqueue status bitmask. | |
50 | .Bl -tag -width xxxxxxx -compact | |
51 | .It Sy k | |
52 | kqueue is in a | |
53 | .Fn kevent* | |
54 | wait set (KQ_SLEEP). | |
55 | .It Sy s | |
56 | kqueue is in a | |
57 | .Fn select | |
58 | wait set (KQ_SEL). | |
59 | .It Sy 3 6 q | |
60 | Type of kevents on this kqueue: KEV32, KEV64, or KEV_QOS. | |
61 | .El | |
62 | .It ident | |
63 | kevent identifier. The meaning depends on the kevent filter specified. Where | |
64 | possible, | |
65 | .Nm lskq | |
66 | prints both numeric and symbolic names. | |
67 | .It filter | |
68 | kevent filter type (EVFILT_*). | |
69 | .It fdtype | |
70 | file descriptor type, for filters operating on file descriptors. | |
71 | .It fflags | |
72 | kevent 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 | |
77 | NOTE_LOWAT | |
78 | .Pp | |
79 | .It EVFILT_MACHPORT: | |
80 | .It Sy r | |
81 | MACH_RCV_MSG | |
82 | .Pp | |
83 | .It EVFILT_VNODE: | |
84 | .It Sy d | |
85 | NOTE_DELETE | |
86 | .It Sy w | |
87 | NOTE_WRITE | |
88 | .It Sy e | |
89 | NOTE_EXTEND | |
90 | .It Sy a | |
91 | NOTE_ATTRIB | |
92 | .It Sy l | |
93 | NOTE_LINK | |
94 | .It Sy r | |
95 | NOTE_RENAME | |
96 | .It Sy v | |
97 | NOTE_REVOKE | |
c0bbac3a A |
98 | .It Sy u |
99 | NOTE_FUNLOCK | |
9726c137 A |
100 | .Pp |
101 | .It EVFILT_PROC: | |
102 | .It Sy x | |
103 | NOTE_EXIT | |
104 | .It Sy t | |
105 | NOTE_EXITSTATUS | |
cf37c299 A |
106 | .It Sy d |
107 | NOTE_EXIT_DETAIL | |
9726c137 A |
108 | .It Sy f |
109 | NOTE_FORK | |
110 | .It Sy e | |
111 | NOTE_EXEC | |
112 | .It Sy s | |
113 | NOTE_SIGNAL | |
114 | .It Sy r | |
115 | NOTE_REAP | |
116 | .Pp | |
117 | .It EVFILT_TIMER: | |
d52496fd A |
118 | .It Sy s u n m |
119 | NOTE_SECONDS, NOTE_USECONDS, NOTE_NSECONDS, NOTE_MACHTIME | |
120 | .It Sy a A | |
121 | NOTE_ABSOLUTE, NOTE_MACH_CONTINUOUS_TIME | |
9726c137 A |
122 | .It Sy c |
123 | NOTE_CRITICAL | |
124 | .It Sy b | |
125 | NOTE_BACKGROUND | |
126 | .It Sy l | |
127 | NOTE_LEEWAY | |
cf37c299 A |
128 | .Pp |
129 | .It EVFILT_USER: | |
130 | .It Sy t | |
131 | NOTE_TRIGGER | |
132 | .It Sy a | |
133 | NOTE_FFAND | |
134 | .It Sy o | |
135 | NOTE_FFOR | |
887d5eed A |
136 | .Pp |
137 | .It EVFILT_WORKLOOP: | |
d52496fd A |
138 | .It Sy t w i |
139 | NOTE_WL_THREAD_REQUEST, NOTE_WL_SYNC_WAIT, NOTE_WL_SYNC_IPC | |
140 | .It Sy W | |
887d5eed A |
141 | NOTE_WL_SYNC_WAKE |
142 | .It Sy q | |
143 | NOTE_WL_UPDATE_QOS | |
d52496fd A |
144 | .It Sy o |
145 | NOTE_WL_DISCOVER_OWNER | |
146 | .It Sy e | |
147 | NOTE_WL_IGNORE_ESTALE | |
9726c137 A |
148 | .El |
149 | .It flags | |
150 | kevent generic flags bitmask. | |
151 | .Bl -tag -width xxxxxxx -compact | |
152 | .It Sy a | |
153 | EV_ADD | |
154 | .It Sy n | |
155 | EV_ENABLE | |
156 | .It Sy d | |
157 | EV_DISABLE | |
158 | .It Sy x | |
159 | EV_DELETE | |
cf37c299 | 160 | .Pp |
9726c137 A |
161 | .It Sy r |
162 | EV_RECEIPT | |
163 | .It Sy 1 | |
164 | EV_ONESHOT | |
165 | .It Sy c | |
166 | EV_CLEAR | |
cf37c299 A |
167 | .It Sy s |
168 | EV_DISPATCH | |
169 | .Pp | |
170 | .It Sy u | |
171 | EV_UDATA_SPECIFIC | |
172 | .It Sy p | |
173 | EV_FLAG0 (EV_POLL) | |
174 | .It Sy b | |
175 | EV_FLAG1 (EV_OOBAND) | |
9726c137 A |
176 | .It Sy o |
177 | EV_EOF | |
178 | .It Sy e | |
179 | EV_ERROR | |
180 | .El | |
181 | .It evst | |
182 | kevent status bitmask. | |
183 | .Bl -tag -width xxxxxxx -compact | |
184 | .It Sy a | |
cf37c299 | 185 | KN_ACTIVE (event has triggered) |
9726c137 | 186 | .It Sy q |
cf37c299 | 187 | KN_QUEUED (event has been added to the active list) |
9726c137 | 188 | .It Sy d |
d52496fd A |
189 | KN_DISABLED (knote is disabled) |
190 | .It Sy p | |
191 | KN_SUPPRESSED (event delivery is in flight) | |
9726c137 | 192 | .It Sy s |
d52496fd | 193 | KN_STAYACTIVE (event is marked as always-enqueued on the active list) |
cf37c299 | 194 | .Pp |
639dadd6 | 195 | .It Sy d |
d52496fd A |
196 | KN_DROPPING (knote is about to be dropped) |
197 | .It Sy l | |
198 | KN_LOCKED (knote is locked) | |
199 | .It Sy P | |
200 | KN_POSTING (knote is being posted) | |
201 | .It Sy m | |
202 | KN_MERGE_QOS (knote is in override saturating mode) | |
639dadd6 | 203 | .Pp |
d52496fd A |
204 | .It Sy D |
205 | KN_DEFERDELETE (knote is waiting for deferred-delete ack) | |
639dadd6 A |
206 | .It Sy v |
207 | KN_REQVANISH | |
208 | .It Sy n | |
209 | KN_VANISHED | |
9726c137 | 210 | .El |
639dadd6 A |
211 | .It qos |
212 | The QoS requested for the knote. | |
9726c137 A |
213 | .It data |
214 | Filter-specific data. | |
215 | .El | |
216 | .Pp | |
217 | If the | |
218 | .Fl v | |
219 | (verbose) option is specified, the opaque user-data field and further | |
220 | filter-specific extension fields are printed in raw hexadecimal. | |
221 | .Sh NOTES | |
222 | The output of | |
223 | .Nm lskq | |
224 | is not an atomic snapshot of system state. In cases where | |
225 | .Nm lskq | |
226 | is able to detect an inconsistency, a warning will be printed. | |
cf37c299 A |
227 | .Pp |
228 | Not 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 |