onstat -g rwm command: Print read and write mutexes

Use the onstat -g rwm command to display information about read, write, and waiting mutex threads, and to list the addresses of the tickets that these threads have acquired.

Figure 1: Syntax:

1  onstat   -g rwm

Example output

Figure 2: onstat -g rwm command output
MUTEX   NAME     write/read/wait    tcb list
<address> <name>     first mutex
       Writer     ticket = <ticket address>   tcb=<thread address> <thread name>
       Readers    ticket = <ticket address>   tcb=<thread address> <thread name>
       Waiters    ticket = <ticket address>   tcb=<thread address> <thread name>
<address> <name>        second mutex
       Writer     ticket = <ticket address>   tcb=<thread address> <thread name>
       Readers     ticket = <ticket address>  tcb=<thread address> <thread name>
       Waiters     ticket = <ticket address>  tcb=<thread address> <thread name>
....
....
....
<address> <name>       last mutex
       Writer     ticket = <ticket address>   tcb=<thread address> <thread name>
       Readers    ticket = <ticket address>   tcb=<thread address> <thread name>
       Waiters    ticket = <ticket address>   tcb=<thread address> <thread name>

Output description

tcb
List of thread addresses
Writer
List of write threads
Readers
List of read threads
Waiters
List of waiting threads
ticket
Address of ticket acquired by the thread