onstat commands

Message Log

The message log is a plain text file that contains a number of useful records, such as:

  • checkpoint duration
  • filling of logical logs
  • logical log backup information
  • allocation of additional virtual memory segments
  • startup and shutdown

The simplest way of monitoring the message log is to use the onstat -m command. The output will look something like this:

C:\Program Files\IBM\IBM Informix Dynamic Server\11.10>onstat -m

IBM Informix Dynamic Server Version 11.10.TC1     -- On-Line -- Up 00:00:25 -- 21696 Kbytes

Message Log File: C:\PROGRA~1\IBM\IBMINF~1\11.10\ids111tc1.log

16:16:44  Physical Recovery Started at Page (1:644).
16:16:45  Physical Recovery Complete: 0 Pages Examined, 0 Pages Restored.
16:16:45  Logical Recovery Started.
16:16:45  10 recovery worker threads will be started.
16:16:45  Dynamically allocated new virtual shared memory segment (size 8192KB)
16:16:45  Memory sizes:resident:5312 KB, virtual:16384 KB, no SHMTOTAL limit
16:16:45  WARNING! Physical Log size 2000 is too small.
          Physical Log overflows may occur during peak activity.
          Recommended minimum Physical Log size is 80 times maximum
          concurrent user threads.

16:16:48  Logical Recovery has reached the transaction cleanup phase.
16:16:48  Logical Recovery Complete.
          0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks

16:16:49  Dataskip is now OFF for all dbspaces
16:16:49  Init operation complete - Mode Online
16:16:50  On-Line Mode
16:16:52  SCHAPI: Started dbScheduler thread.

In common with most onstat and oncheck commands, onstat -m has a header line:

IBM Informix Dynamic Server Version 11.10.TC1 – On-Line – Up 00:00:25 – 21696 Kbytes

The header line tells you the version of IDS you are running (as you can see, I'm running an old version!), the status of the engine, how long it has been up (if relevant) and how much memory the server instance is using.

Notice that the location and name of the log file is displayed immediately after the header:

Message Log File: C:\PROGRA~1\IBM\IBMINF~1\11.10\ids111tc1.log

You can also use a file pager (such as more, less or pg) or an editor to view the file:

05:00:45  Maximum server connections 1
05:00:45  Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 7, Llog used 3
05:40:46  Checkpoint Completed:  duration was 0 seconds.
05:40:46  Wed Jun 18 - loguniq 163, logpos 0x102018, timestamp: 0x685c82 Interval: 5022
05:40:46  Maximum server connections 1
05:40:46  Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 36, Llog used 
25

16:16:30  IBM Informix Dynamic Server Started.

Tue Jul 22 16:16:31 2008

16:16:31  Warning: ONCONFIG dump directory (DUMPDIR) 'C:\PROGRA~1\IBM\IBMINF~1\11.10\tmp' has insecure 
permissions
16:16:37  Booting Language <c> from module <>
16:16:37  Loading Module <CNULL>
16:16:38  Booting Language <builtin> from module <>
16:16:38  Loading Module <BUILTINNULL>
16:16:43  DR: DRAUTO is 0 (Off)
16:16:43  DR: ENCRYPT_HDR is 0 (HDR encryption Disabled)
16:16:44  IBM Informix Dynamic Server Version 11.10.TC1     Software Serial Number AAA#B000000
16:16:44  Performance Advisory: The current size of the physical log buffer is smaller than 
recommended.
16:16:44   Results: Transaction performance might not be optimal.
16:16:44   Action: For better performance, increase the physical log buffer size to 128.
16:16:44  The current size of the logical log buffer is smaller than recommended.
16:16:44  IBM Informix Dynamic Server Initialized -- Shared Memory Initialized.

16:16:44  Physical Recovery Started at Page (1:644).
16:16:45  Physical Recovery Complete: 0 Pages Examined, 0 Pages Restored.
16:16:45  Logical Recovery Started.
16:16:45  10 recovery worker threads will be started.
16:16:45  Dynamically allocated new virtual shared memory segment (size 8192KB)
16:16:45  Memory sizes:resident:5312 KB, virtual:16384 KB, no SHMTOTAL limit
16:16:45  WARNING! Physical Log size 2000 is too small.
          Physical Log overflows may occur during peak activity.
          Recommended minimum Physical Log size is 80 times maximum
          concurrent user threads.
16:16:48  Logical Recovery has reached the transaction cleanup phase.
16:16:48  Logical Recovery Complete.
          0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks
16:16:49  Dataskip is now OFF for all dbspaces
16:16:49  Init operation complete - Mode Online
16:16:50  On-Line Mode
16:16:52  SCHAPI: Started dbScheduler thread.
16:16:56  SCHAPI: Started 2 dbWorker threads.
16:16:58  Booting Language <spl> from module <>
16:16:58  Loading Module <SPLNULL>
16:16:58  Logical Log 163 Complete, timestamp: 0x688680.
16:16:59  Performance Advisory: Based on the current workload, the physical log might be too small 
to accommodate the time it takes to flush the buffer pool.
16:16:59   Results: The server might block transactions during checkpoints.
16:16:59   Action: If transactions are blocked during the checkpoint, increase the size of the 
physical log to at least 28000 KB.
16:16:59  Performance Advisory: Based on the current workload, the logical log space might be too 
small to accommodate the time it takes to flush the buffer pool.
16:16:59   Results: The server might block transactions during checkpoints.
16:16:59   Action: If transactions are blocked during the checkpoint, increase the size of the 
logical log space to at least 28000 KB.
16:16:59  Performance Advisory: The physical log is too small for automatic checkpoints.
16:16:59   Results: Automatic checkpoints are disabled.
16:16:59   Action: To enable automatic checkpoints, increase the physical log to at least 28000 KB.
16:17:57  Logical Log 164 Complete, timestamp: 0x68b9a9.

A couple of things are evident from the snippet above:

  1. The engine was not shut down properly, there is no shutdown message before the IBM Informix Dynamic Server Started message. Despite this, nothing was lost, because the logical recovery reported 0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks.
  2. The engine is not optimally configured: the physical log buffer, logical log buffer, physical log and the logical log are all too small, from the various messages in the log.
  3. The engine is up and running, from the header.
  4. A logical log has been filled, from the last line.

Keep an eye on your message log, it's full of valuable information! ;-)

Instance Configuration

Instance Profile

Physical/Logical Log(s)

Sessions

All Sessions

Individual Session

Checkpoints

Locks

 
idsdev/admin/onstat.txt · Last modified: 2008/07/22 18:00 by spokey     Back to top