onstat - command: Print output header

All onstat output includes a header. The onstat - command displays only the output header and the value that is returned from this command indicates the database server mode.

Read syntax diagramSkip visual syntax diagram
Syntax:

>>-onstat-- - -------------------------------------------------><

The header takes the following form:
Version--Mode (Type)--(Checkpnt)--Up Uptime--Sh_mem Kbytes
Version
Is the product name and version number
Mode
Is the current operating mode.
(Type)
If the database server uses High-Availability Data Replication, indicates whether the type is primary or secondary

If the database server is not involved in data replication, this field does not appear. If the type is primary, the value P appears. If the type is secondary, the value S appears.

(Checkpnt)
Is a checkpoint flag

If it is set, the header might display two other fields after the mode if the timing is appropriate:

(CKPT REQ)
Indicates that a user thread has requested a checkpoint
(CKPT INP)
Indicates that a checkpoint is in progress. During the checkpoint, access is limited to read only. The database server cannot write or update data until the checkpoint ends
Uptime
Indicates how long the database server has been running

If the system time is manually changed to the past and the server startup time is later than the current system time, the uptime is not available. In this situation, the header displays the text Uptime Unavailable.

Sh_mem
Is the size of database server shared memory, expressed in kilobytes
A sample header for the database server follows:
Informix Version 14.10.UC1--On-Line--Up 15:11:41--9216 Kbytes
If the database server is blocked, the onstat header output includes an extra line. For information about status codes in that line, see Monitor the database server status.

Return codes

When you exit the onstat utility, there are several useful codes that are displayed. See Return codes on exiting the onstat utility.


Copyright© 2019 HCL Technologies Limited