The threads command lists all known threads except internal threads created by DECthreads (including the null threads, which are run when a virtual processor can find no other thread to execute).
Format:
threads [threads-number] [qualifier]
threads-number
One or more sequence numbers separated by spaces. If specified, only those objects whose sequence numbers are listed are displayed. Each argument that does not begin with "-" is interpreted as the sequence number of an object.
Qualifier Description -1 (Digit "1") Display threads in a one-line tabular format. -a Include internal threads created by DECthreads. -b List threads that are currently blocked (waiting on a condition variable or attempting to lock a mutex). -c List the threads that are currently running. (On a uniprocessor implementation, there is only one at any time.) -d List the threads that have been detached. (cma_ detach or pthread_detach called for the thread, or it was created with the detached attribute set.) -f Give full information on threads. Essentially, this sets all the "display" selection flags. Always use -f and -a qualifiers when submitting debug output as a part of a problem report. -h List the threads that have been held using the tset -h command. -k Display the thread-specific data values associated with each selected thread. -l List threads that own mutexes. (Normal mutexes are not included unless metering is enabled.) -m Display only the current thread. -n List the threads that have not been held. -o Select specific output fields. For example, thread -o res. b : blocking information c : cancel status i : "internal" state k : tsd keys l : show owned mutexes (if known) m : miscellaneous state r : realtime scheduling information s : stack information v : virtual processor state -r List the threads that are ready to run. (They are not blocked or terminated, but cannot currently run because the processor is busy.) -s policy List threads with particular scheduling policies [operator and priorities. The policy field is required priority] and specifies the name of a scheduling policy: fifo, rr, foreground, background, ada_rtb, ada_low, or idle. The operator field specifies a C relational operator that is to be applied in comparing a thread's priority against the -s criteria: ==, !=, >, <, >=, <=. Finally, the priority field is a priority value within the priority range for the specified scheduling policy; the keywords min (minimum priority), mid (midrange priority), and max (maximum priority) are accepted as well as integer values. The operator and priority fields are optional. If both are omitted, all threads with the specified scheduling policy will be selected. -t List the threads that have terminated, but have not yet been detached. (They are waiting for another thread to join with them.)