onstat -r command: Repeatedly print selected statistics

Use the onstat -r command to repeatedly print the statistics for other options specified in the command at specified intervals.

Figure 1. Syntax:

1  onstat   -r
2.1  seconds other_options
2.1  other_options

Use the onstat -r seconds other_options command to specify the seconds to repeat the other option.

Use onstat -r other_options command to have the option repeat every five seconds, which allows the other options to be concatenated with the -r option, as in this example: onstat -rFh.

The onstat -r command can be used in both command mode and interactive mode, and can be useful for repeating command output to monitor system resource utilization.

Example output running the onstat -r command every five seconds

Figure 2. command output
onstat -r

HCL Informix Dynamic Server Version 11.70.F       -- On-Line -- Up 20:05:25 -- 1067288 Kbytes


HCL Informix Dynamic Server Version 11.70.F       -- On-Line -- Up 20:05:30 -- 1067288 Kbytes


HCL Informix Dynamic Server Version 11.70.F       -- On-Line -- Up 20:05:35 -- 1067288 Kbytes

Example output running the onstat -r command every ten seconds

Figure 3. command output
onstat -r 10

HCL Informix Dynamic Server Version 11.50.F       -- On-Line -- Up 20:06:58 -- 1067288 Kbytes


HCL Informix Dynamic Server Version 11.50.F       -- On-Line -- Up 20:07:08 -- 1067288 Kbytes


HCL Informix Dynamic Server Version 11.50.F       -- On-Line -- Up 20:07:18 -- 1067288 Kbytes

Example output running the onstat -r every one second, with the -h option

Figure 4. onstat -r 1 -h command output
onstat -r 1 -h 

Buffer pool page size: 2048

buffer hash chain length histogram
   # of chains         of len
          3841              0
          3767              1
           522              2
            62              3
          8192   total chains
          4351   hashed buffs
          5000    total buffs


Buffer pool page size: 2048

buffer hash chain length histogram
   # of chains         of len
          4020              0
          3392              1
           735              2
            43              3
             2              4
          8192   total chains
          4172   hashed buffs
          5000    total buffs

Example output running the onstat -r command every five seconds, with the -Fh options

Figure 5. onstat -rFh command output
onstat -rFh


Fg Writes     LRU Writes    Chunk Writes
0             0             21

address           flusher  state    data     # LRU    Chunk    Wakeups  Idle Tim
460e6820         0        I        0        0        2        5        9.820
      states: Exit Idle Chunk Lru

Buffer pool page size: 2048

buffer hash chain length histogram
   # of chains         of len
          6342              0
          1850              1
          8192   total chains
          1850   hashed buffs
          5000    total buffs


Fg Writes     LRU Writes    Chunk Writes
0             0             21

address           flusher  state    data     # LRU    Chunk    Wakeups  Idle Tim
460e6820         0        I        0        0        2        10       22.755
      states: Exit Idle Chunk Lru

Buffer pool page size: 2048

buffer hash chain length histogram
   # of chains         of len
          4396              0
          3796              1
          8192   total chains
          3796   hashed buffs
          5000    total buffs