LSKQ(1)

πŸ“¦ version 1042.100.6.0.1, in nixpkgs unstable

okay bestie, this is LSKQ(1) from the General Commands Manual β€” the page that shows process kqueue state, and it's lowkey iconic for peeking at what processes are waiting on πŸ’…βœ¨

πŸ¦‹ NAME πŸ¦‹

lskq β€” display process kqueue state πŸ‘€

🌸 SYNOPSIS 🌸

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

πŸŽ€ DESCRIPTION πŸŽ€

The lskq command enumerates kqueues and registered kevents of running processes. That's the whole mission, and it ate. πŸ’–

✨ 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) 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 🫢

That’s the whole LSKQ(1) moment, bestie β€” from macOS, dated April 20, 2015. Mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from