Display Informix Configuration Parameters with “onstat”

Published on October 29, 2020 by Admin

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.