onstat — Server Status Line
The commands and their outputs might not be available on your version — for example onstat -g rah is relatively new, or onstat -t no longer has a resident column.
Want to see this on a PDA? All the commands are available in short form. For example, onstat -g seg can be seen at www.oninit.com/onstatgseg. So just skip the spaces and dashes and it should just work. On Google Chrome just add www.oninit.com/ in front of the command you would normally run at the command line.
The onstat - command will produce a status line for the Informix server. The status line is produced with every onstat command that is executed, with a few exceptions. The first portion identifies the server and the current version. The second portion indicates the status of the server. The status of the Informix server can take on one of the following 9 values:
- Initialization
- Shutting Down
- Quiescent
- OnLine
- Fast Recovery
- Abort
- Archive Backup
- Unknown
- Read-Only
Additionally, the server status can be accompanied by secondary information. The value of (Prim) or (Sec) will be displayed for systems running data replication. (CKPT REQ) will appear if a checkpoint is required; (CKPT INP) will appear if a checkpoint is in progress; and (LONGTX) will appear if a long transaction is currently being rolled back.
The final two portions provide the length of time the server has been up, followed by the total size of the shared memory segments (resident + virtual) used by the server in Kbytes. If the server is blocked from performing any work, the reason for the block is added to the end of the status line. The possible reasons for a blocked system include:
CKPT— CheckpointLONGTX— Long TransactionARCHIVE— Archive Requested BlockMEDIA_FAILURE— DBSpace being marked downHANG_SYSTEM— Server Requested BlockDBS_DROP— DBSpace is being droppedDDR— DDR SynchronizationLBU— Prevent Log BackupsARCHIVE_EBR— Blocked for External Backup and RecoveryCHG_PLOG— Blocked while physical log is being changedCKPT INP— Interval checkpoint in progressDYNAMIC_LOG— Log file is being added dynamicallyDYNAMIC_LOG_FOR_ER— Log file is being added dynamically in ER setupFREE_LOG— Log file is being freedHA_CONV_STD— Blocked while High Availability server is being converted to standard serverHA_FAILOVER— Blocked while High Availability server failover being processedHANG_SYSTEM— Database server failureLAST_LOG_RESERVED4BACKUP— Waiting for last available log to be backed upLOG_DROP— Log file is being droppedOVERRIDE_DOWN_SPACE— Waiting to override down dbspace setting because the ONDBSPACEDOWN onconfig parameter is set to WAIT
The following SQL should report the header information:
select * from sysshmhdr where name like "ckpt%";
Notes
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".