---
name: "lskq"
section: "1"
platform: "macos"
package: "system_cmds"
version: "1042.120.1"
release: "macOS 26.5"
platforms: ["macos"]
url: "https://new.carta.tech/lskq"
---

# lskq(1)

display process kqueue state

## NAME

**lskq** – display process kqueue state

## SYNOPSIS

**lskq** \[**-vhe**\] \[**-p** *\<pid\>* \| **-a**\]

## DESCRIPTION

The **lskq** command enumerates kqueues and registered kevents of running processes.

## OPTIONS

- **-p** *\<pid\>*

  Show kqueues of process *\<pid\>*.

- **-a**

  Show kqueues for all running processes. Requires root.

- **-v**

  Verbose: show opaque user data and filter-specific extension fields.

- **-e**

  Ignore empty kqueues.

- **-r**

  Print fields in raw hex.

- **-h**

  Show help and exit.

## OUTPUT

**lskq** prints one line of output for each registered kevent, consisting of process, kqueue, and kevent information. For kqueues with no registered kevents, a single line is output with an ident of \`-'. See [kevent(2)](/kevent/2.md) for field semantics. The output columns are:

- command

  shortened process name.

- pid

  process identifier.

- kq

  file descriptor corresponding to kqueue, or \`\`wq'' for the special workq kqueue.

- kqst

  kqueue status bitmask.

  - **k**

    kqueue is in a **kevent\***() wait set (KQ\_SLEEP).

  - **s**

    kqueue is in a **select**() wait set (KQ\_SEL).

  - **3** **6** **q**

    Type of kevents on this kqueue: KEV32, KEV64, or KEV\_QOS.

- ident

  kevent identifier. The meaning depends on the kevent filter specified. Where possible, **lskq** prints both numeric and symbolic names.

- filter

  kevent filter type (EVFILT\_\*).

- fdtype

  file descriptor type, for filters operating on file descriptors.

- fflags

  kevent filter flags bitmask. The meaning of each field depends on the filter type.

  - EVFILT\_READ:

    - **l**

    NOTE\_LOWAT

  - EVFILT\_MACHPORT:

    - **r**

    MACH\_RCV\_MSG

  - EVFILT\_VNODE:

    - **d**

    NOTE\_DELETE

  - **w**

    NOTE\_WRITE

  - **e**

    NOTE\_EXTEND

  - **a**

    NOTE\_ATTRIB

  - **l**

    NOTE\_LINK

  - **r**

    NOTE\_RENAME

  - **v**

    NOTE\_REVOKE

  - **u**

    NOTE\_FUNLOCK

  - EVFILT\_PROC:

    - **x**

    NOTE\_EXIT

  - **t**

    NOTE\_EXITSTATUS

  - **d**

    NOTE\_EXIT\_DETAIL

  - **f**

    NOTE\_FORK

  - **e**

    NOTE\_EXEC

  - **s**

    NOTE\_SIGNAL

  - **r**

    NOTE\_REAP

  - EVFILT\_TIMER:

    - **s** **u** **n** **m**

    NOTE\_SECONDS, NOTE\_USECONDS, NOTE\_NSECONDS, NOTE\_MACHTIME

  - **a** **A**

    NOTE\_ABSOLUTE, NOTE\_MACH\_CONTINUOUS\_TIME

  - **c**

    NOTE\_CRITICAL

  - **b**

    NOTE\_BACKGROUND

  - **l**

    NOTE\_LEEWAY

  - EVFILT\_USER:

    - **t**

    NOTE\_TRIGGER

  - **a**

    NOTE\_FFAND

  - **o**

    NOTE\_FFOR

  - EVFILT\_WORKLOOP:

    - **t** **w** **i**

    NOTE\_WL\_THREAD\_REQUEST, NOTE\_WL\_SYNC\_WAIT, NOTE\_WL\_SYNC\_IPC

  - **W**

    NOTE\_WL\_SYNC\_WAKE

  - **q**

    NOTE\_WL\_UPDATE\_QOS

  - **o**

    NOTE\_WL\_DISCOVER\_OWNER

  - **e**

    NOTE\_WL\_IGNORE\_ESTALE

  - **R**

    POLICY\_RR

  - **F**

    POLICY\_FIFO

  - **P**

    Priority Configured on workloop

- flags

  kevent generic flags bitmask.

  - **a**

    EV\_ADD

  - **n**

    EV\_ENABLE

  - **d**

    EV\_DISABLE

  - **x**

    EV\_DELETE

  - **r**

    EV\_RECEIPT

  - **1**

    EV\_ONESHOT

  - **c**

    EV\_CLEAR

  - **s**

    EV\_DISPATCH

  - **u**

    EV\_UDATA\_SPECIFIC

  - **p**

    EV\_FLAG0 (EV\_POLL)

  - **b**

    EV\_FLAG1 (EV\_OOBAND)

  - **o**

    EV\_EOF

  - **e**

    EV\_ERROR

- evst

  kevent status bitmask.

  - **a**

    KN\_ACTIVE (event has triggered)

  - **q**

    KN\_QUEUED (event has been added to the active list)

  - **d**

    KN\_DISABLED (knote is disabled)

  - **p**

    KN\_SUPPRESSED (event delivery is in flight)

  - **s**

    KN\_STAYACTIVE (event is marked as always-enqueued on the active list)

  - **d**

    KN\_DROPPING (knote is about to be dropped)

  - **l**

    KN\_LOCKED (knote is locked)

  - **P**

    KN\_POSTING (knote is being posted)

  - **m**

    KN\_MERGE\_QOS (knote is in override saturating mode)

  - **D**

    KN\_DEFERDELETE (knote is waiting for deferred-delete ack)

  - **v**

    KN\_REQVANISH

  - **n**

    KN\_VANISHED

- qos

  The QoS requested for the knote.

- data

  Filter-specific data.

If the **-v** (verbose) option is specified, the opaque user-data field and further filter-specific extension fields are printed in raw hexadecimal.

## NOTES

The output of **lskq** is not an atomic snapshot of system state. In cases where **lskq** is able to detect an inconsistency, a warning will be printed.

Not all flags are symbolicated. Use **-r** (raw mode) to inspect additional flags.

## SEE ALSO

ddt(1), [lsmp(1)](/lsmp/1.md), [kevent(2)](/kevent/2.md), [kqueue(2)](/kqueue/2.md), [lsof(8)](/lsof/8.md)
