Currently the output of 'procstat kqueues' looks like this:
PID KQFD FILTER IDENT FLAGS FFLAGS DATA UDATA EXT0 EXT1 EXT2 EXT3 STATUS 2323 13 READ 5 0 0 0 0x34887b416000 0 0 0 0 0 2323 13 READ 8 0 0 0 0x34887b44f070 0 0 0 0 0 2323 13 READ 10 0 0 0 0x34887b44f0e0 0 0 0 0 0 2323 13 SIGNAL 1 0x20(CLEAR) 0 0 0x0 0 0 0 0 0 2323 13 SIGNAL 2 0x20(CLEAR) 0 0 0x0 0 0 0 0 0 2323 13 SIGNAL 3 0x20(CLEAR) 0 0 0x0 0 0 0 0 0 2323 13 SIGNAL 13 0x20(CLEAR) 0 0 0x0 0 0 0 0 0 2323 13 SIGNAL 14 0x20(CLEAR) 0 0 0x0 0 0 0 0 0 2323 13 SIGNAL 15 0x20(CLEAR) 0 0 0x0 0 0 0 0 0 2323 13 SIGNAL 20 0x20(CLEAR) 0 0 0x0 0 0 0 0 0
TODO1: add filter-specific reporting. See the vnode data in the kinfo, it is still not yet displayed by procstat.
TODO2: fix ABI of kinfo_kevent
TODO3: consider compat32 (currently EOPNOTSUPP)