Tech Topic: Onstat

Display Informix Configuration Parameters with “onstat”
Informix configuration settings are stored in $INFORMIXDIR/etc/$ONCONFIG. When checking to see an individual setting, an alternative to viewing the entire file is to run “onstat -c”. This shows the contents of the onconfig file. Using this onstat with grep allows you to easily and quickly see the value of a onconfig setting. For example, to see the setting for FILLFACTOR, run:
onstat -c | grep ^FILLFACTOR
FILLFACTOR 90


onstat -g cfg displays all the configuration values. By specifying a parameter name, the onstat will show the value for that one setting.
onstat -g cfg FILLFACTOR

IBM Informix Dynamic Server Version 14.10.FC3DE -- On-Line -- Up 03:25:37 -- 273228 Kbytes

name                      current value
FILLFACTOR                95


The different value in the example above is because the FILLFACTOR was changed dynamically with onmode to change the setting in memory only (onmode -wm FILLFACTOR=95). The current setting is shown by onstat -g cfg. Use onstat -g cfg diff to show those parameters which do not match the value in the onconfig file, for example:
onstat -g cfg diff

IBM Informix Dynamic Server Version 14.10.FC3DE -- On-Line -- Up 03:27:44 -- 273228 Kbytes

Adjusted Configuration Parameters

id   name                      type    maxlen   units   rsvd  tunable
37   FILLFACTOR                INT4    12       %             *

     onconfig: 90
     current : 95


This also shows the permitted format of the parameter. The asterisk for “tunable” shows that this is a value that can be changed on the fly with onmode -wf or onmode -wm (use onstat -g cfg tunable to list all parameters that can be changed this way). The onstat -g cfg diff command will also list all settings that have been modified at startup where the value in the onconfig has been modified to an internal value, for example:
id   name                      type    maxlen   units   rsvd  tunable
47   RESTARTABLE_RESTORE       BOOL    2

     onconfig: ON
     current : 1


Use the “full” keyword with this onstat to view a useful description of the parameter:
onstat -g cfg full FILLFACTOR

IBM Informix Dynamic Server Version 14.10.FC3DE -- On-Line -- Up 03:34:06 -- 273228 Kbytes

Configuration Parameter Info

id   name                      type    maxlen   units   rsvd  tunable
37   FILLFACTOR                INT4    12       %             *

     min/max : 1,100
     default : 90
     onconfig: 90
     current : 95

     Description:
     Use the FILLFACTOR configuration parameter to specify the degree
     of index-page fullness. A low value provides room for growth in
     the index. A high value compacts the index.


One last option to this onstat command is one that can reduce the need to view the Informix log or Informix startup output. onstat -g cfg msg shows those parameters that generated informational messages during the last startup.
onstat -g cfg msg

IBM Informix Dynamic Server Version 14.10.FC3DE -- On-Line -- Up 00:00:17 -- 265036 Kbytes

Configuration Parameters With Messages

name                      message
LTXHWM                    Parameter's user-configured value was adjusted.
DIRECT_IO                 Concurrent I/O is supported only on AIX


However, this won’t show all problems in the onconfig, for example an invalid dbspace listed in DBSPACETEMP. One last thing – an alternative way to check the original and current values of Informix config settings is to query the sysmaster table sysconfig, for example:
select * from sysmaster:sysconfig where cf_name = "FILLFACTOR";

cf_id         37
cf_name       FILLFACTOR
cf_flags      2129986
cf_original   90
cf_effective  95
cf_default    90


Using these onstats, and the sysconfig table, allows a DBA to easily review the Informix configuration settings, see descriptions of them, and track changes.
Informix Tutorial – Informix Database Server Monitoring

How do you use the command-line utilities to manage and monitor an Informix Server? We will discuss onstat, oncheck, and the new InformixHQ to manage your server.

Informix 14.10 Command Line Utilities Quick Reference Guide
I have updated our series of Informix Command Line Utilities Quick Reference Guides. Folks, you can download the Informix 14 Quick Reference Guide here. The Quick Reference Guide includes the following Informix commands: Oncheck Oninit Onmode Onparams Onspaces Onstat Ontape In 1995, after years of trying to find a manual to check the command line […]
Informix Best Practices – Using the Sysmaster database to perform an Informix Server Heath Check

This is the latest Webcast replay of Lester’s talk on Exploring the Sysmaster database. He presented cripts to monitor and tune your Informix Server and perform a system health check. Examples include how to tell what is the most expensive query running on your server now, what page size is best for your tables, what indexes are used and not used, how is memory used on your server, and much more…. These scripts will help you identify the performance bottlenecks on your Informix Server.

Best Practices for Getting Started with Informix

This webcast will focus on best practices for Informix DBAs including:
* Informix Products Overview
* Informix Architecture – Memory, CPU, Disk Requirements
* Planning an Informix Install
* Installing Informix
* Software Directory Structure
* Using Informix SQL
* Informix Documentation
* Informix Resources on the Web

Informix Performance Tuning

Art went through the steps one takes to determine the health of the server and start Informix Database Performance Tuning:

* Overall Performance
* IO Performance
* Tablespace Performance
* Memory Performance
* Virtual Processor Performance
* OS Performance
* Caches

Exploring the Informix OnLine Utilities
This post is the original article I wrote on Exploring the Infomrix Utilities that has been reprinted in many other places.   INFORMIX-OnLine DSA comes with a set of powerful command line utilities that enable you to monitor, tune, and configure your database server. This chapter will focus on eight of these utilities, and present […]
Informix Tech Notes article on Exploring the ONSTAT Utility
First published in the Informix Tech Notes Magazine in 1999 Provided with Informix Dynamic Server is a set of powerful command- line utilities that enable the monitoring, tuning, and configuring of the database server. This article focuses on one of these utilities, ONSTAT, and presents ways to use this utility for server performance optimization. ONSTAT […]
A Web/CGI Interface to the ONSTAT Utility
First published in the Washington Area Informix User Group Newsletter Volume 7, No. 2 - April 1997   This is one of the scripts I presented at the WAIUG Training Day. The purpose is to provide a web interface to the INFORMIX-OnLine ONSTAT Utility. There are two parts to this interface: the first is a […]