onstat -g top command: Print top consumers of resources

Use the onstat -g top command to display information about top consumers of various resources such as CPU time, I/O operations, and memory growth.

You can specify the maximum number of consumers to display, along with the sample time interval. The onstat -g top command may be followed by three optional numeric arguments:

Syntax:

>>onstat -g top [<keyword pair>] [<max consumers> [<interval> [<repeats>]]]  
Onstat -g top can take an optional pair of keyword arguments:
  • Top Threads
    • onstat -g top thread cpu: Threads currently using the most CPU time.
    • onstat -g top thread drd: Threads currently performing the most disk reads.
    • onstat -g top thread bfr: Threads currently performing the most buffer reads.
    • onstat -g top thread bfw: Threads currently performing the most buffer writes.
    • onstat -g top thread plg: Threads currently performing the most physical logging.
    • onstat -g top thread llg: Threads currently performing the most logical logging.
  • Top Sessions
    • onstat -g top session cpu: Sessions currently using the most CPU time.
    • onstat -g top session drd: Sessions currently performing the most disk reads.
    • onstat -g top session bfr: Sessions currently performing the most buffer reads.
    • onstat -g top session bfw: : Sessions currently performing the most buffer writes.
    • onstat -g top session plg: Sessions currently performing the most physical logging.
    • onstat -g top session llg: Sessions currently performing the most logical logging.
  • Top Chunks
    • onstat -g top chunk ios: Chunks currently performing the most reads and writes.
    • onstat -g top chunk art: Chunks with the highest average read time.
    • onstat -g top chunk awt: Chunks with the highest average write time.
  • Top Spaces
    • onstat -g top space ios: Spaces currently performing the most reads and writes.
    • onstat -g top space art: Spaces with the highest average read time.
    • onstat -g top space awt: Spaces with the highest average write time.
  • Top Virtual Memory Pools
    • onstat -g top mempool gro: Memory pools currently growing the fastest.
  • Top Session Memory
    • onstat -g top sessmem gro: Sessions currently allocating the most memory.
  • Top Partitions
    • onstat -g top partition drd: Partitions currently performing the most disk reads.
  • Top Tables
    • onstat -g top table drd: Tables currently performing the most disk reads.

Example

Figure 1. onstat -g top command examples
Top 3 spaces for average write times
onstat -g top space awt 3
top 10 tables for disk reads over a 1 minute interval
onstat -g top partition drd 10 60
Top 15 threads for CPU time, sampling every 20 seconds, and repeating 5 times
 onstat -g top thread cpu 15 20 5
Memory pools that are growing, updating every 30 seconds, repeating indefinitely
onstat -g top mempool gro 0 30 0
The least active session in terms of buffer reads, repeating 10 times, with 5 seconds between each update
onstat -g top session BFR 1 5 10
Note: To reverse the order of the consumer list, capitalize the second keyword. For example, the following command will display the top least active chunks:
onstat -g top chunk IOS