rq subcommand

The rq subcommand lists threads currently queued on the system run queues.

Format

rq [ bucket | effectiveaddress]

Parameters

Item Description
bucket Lists all threads queued in a particular bucket across all run queues. The bucket is equal to the thread priority minus 1.
effectiveaddress Lists all threads queued in the bucket specified by the effective address.

If the rq subcommand is used with no parameters, a list of all buckets currently containing threads across all run queues is generated. If the rq subcommand is used with parameters, you can restrict the generated list to a particular run queue or to a particular bucket across all run queues.

Other

runq

Examples

The following is an example of how to use the rq subcommand:

KDB(0)> rq
RQ                BUCKET HEAD            COUNT

02172D04     256 pvthread+000100     1
02172504     256 pvthread+000180     1
02173A1C      70 pvthread+005580     7
02173D04     256 pvthread+000200     1
02173504     256 pvthread+000280     1
KDB(0)> rq 02173A1C  //bucket address from the RQ column
LOCAL RUNQ(  2) ENTRY( 70) 02173A1C
                SLOT NAME     STATE    TID PRI  RQ CPUID  CL WCHAN

pvthread+005580  171>bash     RUN   00AB67 045   2         0
pvthread+004D00  154>bash     RUN   009A7F 045   2         0
pvthread+006100  194>bash     RUN   00C2B7 045   2         0
pvthread+006500  202>bash     RUN   00CAC9 045   2         0
pvthread+004C00  152>bash     RUN   009851 045   2         0
pvthread+006380  199>bash     RUN   00C701 045   2         0
pvthread+006280  197>bash     RUN   00C5B7 045   2         0
KDB(0)> rq 256  //bucket number from the RQ column
LOCAL RUNQ(  0) ENTRY(256) 02172D04
                SLOT NAME     STATE    TID PRI  RQ CPUID  CL WCHAN

pvthread+000100    2>wait     RUN   000205 0FF   0 00000   0
LOCAL RUNQ(  1) ENTRY(256) 02172504
                SLOT NAME     STATE    TID PRI  RQ CPUID  CL WCHAN

pvthread+000180    3>wait     RUN   000307 0FF   1 00001   0
LOCAL RUNQ(  2) ENTRY(256) 02173D04
                SLOT NAME     STATE    TID PRI  RQ CPUID  CL WCHAN

pvthread+000200    4>wait     RUN   000409 0FF   2 00002   0
LOCAL RUNQ(  3) ENTRY(256) 02173504
                SLOT NAME     STATE    TID PRI  RQ CPUID  CL WCHAN

pvthread+000280    5>wait     RUN   00050B 0FF   3 00003   0
GLOBAL RUNQ(node  0) ENTRY(256) 02171904
KDB(0)>