Need advice on compiling dostats utility
Posted in 2026
Ke Chen could not link Art Kagel's dostats and ul on Linux x86_64 (undefined is8bitstr, gcvaccess). Art said to build dostats_ng.ec, not dostats.ec, and check the esql script in PATH; adding -lifsql -lifasf -lifgen -lifos -lifgls -lifglx fixed linking. Later Ke's run only processed stored procedures because of the -p option, and the 'extra argument' was the stray 2. Benjamin Thompson added update statistics notes.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Storage & Space Management, Connectivity: ESQL/C, 4GL & Embedded SQL, Licensing & Editions, Platform-Specific Issues
Tried to compile Art's latest dostats on a linux x86_64 machine, however both make and 'esql -o' got below errors,
I am not too sure if I missed something ( I also tried to update the make executable location and INSTALLDIR, issue persists).
Could I get advice?
[informix@sandbox]$ (sandbox) make
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o ul ul.ec -L/usr/lib/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `idx_getenv':
osenv.c:(.text+0x44): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `ggetenv_oledb':
osenv.c:(.text+0x169b): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osfutil.o): in function `_ofreadable':
osfutil.c:(.text+0x7c5): undefined reference to `gcvaccess'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osfullpath':
osdnet.c:(.text+0x27): undefined reference to `gcvaccess'
/usr/bin/ld: osdnet.c:(.text+0x51): undefined reference to `gcvchdir'
/usr/bin/ld: osdnet.c:(.text+0xbe): undefined reference to `gcvchdir'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osrealdbn':
osdnet.c:(.text+0x448): undefined reference to `gcvstat'
collect2: error: ld returned 1 exit status
make: *** [Makefile:97: ul] Error 1
[informix@sandbox]$ (sandbox) esql -o dostats dostats.ec
dostats.ec: In function 'StripTypeList':
dostats.ec:5480:17: warning: comparison between pointer and zero character constant [-Wpointer-compare]
5480 | while (list != (char)0) {
| ^~
dostats.ec:5480:12: note: did you mean to dereference the pointer?
5480 | while (list != (char)0) {
| ^
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `idx_getenv':
osenv.c:(.text+0x44): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `ggetenv_oledb':
osenv.c:(.text+0x169b): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osfutil.o): in function `_ofreadable':
osfutil.c:(.text+0x7c5): undefined reference to `gcvaccess'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osfullpath':
osdnet.c:(.text+0x27): undefined reference to `gcvaccess'
/usr/bin/ld: osdnet.c:(.text+0x51): undefined reference to `gcvchdir'
/usr/bin/ld: osdnet.c:(.text+0xbe): undefined reference to `gcvchdir'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osrealdbn':
osdnet.c:(.text+0x448): undefined reference to `gcvstat'
collect2: error: ld returned 1 exit status
[informix@sandbox]$ (sandbox) esql -V
IBM Informix CSDK Version 4.50, IBM Informix-ESQL Version 4.50.FC13W1
[informix@sandbox]$ (sandbox) make -version
GNU Make 4.4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[informix@sandbox]$ (sandbox) uname -a
Linux sandbox.ifx.cloud 5.14.0-503.23.2.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Feb 7 15:07:19 EST 2025 x86_64 x86_64 x86_64 GNU/Linux
[informix@sandbox]$ (sandbox) ls -l dostats*
-rw-r--r-- 1 informix informix 278157 Apr 27 13:12 dostats.c
-r-xr-xr-x 1 informix informix 176702 Jan 7 2025 dostats.ec
-rw-r--r-- 1 informix informix 309121 Apr 27 13:08 dostats_ng.c
-r-xr-xr-x 1 informix informix 189734 Jan 14 10:04 dostats_ng.ec
check_version csdk
Currently installed version: 4.50.FC13W1
------------------------------
ke chen
------------------------------
is8bitstr gcvaccess gcvchdir gcvstat are all GLS AFAIK Try something like esql -o dostats dostats.ec -L/opt/informix/lib -L/opt/informix/lib/esql -lifgls On 4/26/2026 8:24 PM, ke chen via IBM Community wrote: 0100019dcc89ae51-343db245-953c-4655-87d9-1a2de47c4271-000000@email.amazonses.com"> Tried to compile Art's latest dostats on a linux x86_64 machine, however both make and 'esql -o' got below errors, I am not too sure if I missed...
still get errors: esql -o dostats dostats.ec -L/opt/informix/lib -L/opt/informix/lib/esql -lifgls dostats.ec: In function 'StripTypeList': dostats.ec:5480:17: warning: comparison between pointer and zero character constant [-Wpointer-compare] 5480 | while (list != (char)0) { | ^~ dostats.ec:5480:12: note: did you mean to dereference the pointer? 5480 | while (list != (char)0) { | ^ /usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `idx_getenv': osenv.c:(.text+0x44): undefined reference to `is8bitstr' /usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `ggetenv_oledb': osenv.c:(.text+0x169b): undefined reference to `is8bitstr' /usr/bin/ld: /opt/informix/lib/esql/libifos.a(osfutil.o): in function `_ofreadable': osfutil.c:(.text+0x7c5): undefined reference to `gcvaccess' /usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osfullpath': osdnet.c:(.text+0x27): undefined reference to `gcvaccess' /usr/bin/ld: osdnet.c:(.text+0x51): undefined reference to `gcvchdir' /usr/bin/ld: osdnet.c:(.text+0xbe): undefined reference to `gcvchdir' /usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osrealdbn': osdnet.c:(.text+0x448): undefined reference to `gcvstat' collect2: error: ld returned 1 exit status ------------------------------ ke chen ------------------------------
Ke:
First, dostats.ec is the OLD version of the source, suitable for servers earlier than v10.00. You need to compile the dostats_ng.ec instead with:
esql -o dostats dostats_ng.ec getopt.c
I will look into that pointer comparison error in the old code anyway, but you should not be using it. It will work once compiled, but it is missing newer features including updates to the algorithms it uses to work out what UPDATE STATISTICS commands to execute.
As far as the problem compiling ul.ec and that process complaining about
is8bitstr, that call is not in the code itself and is being inserted by the ESQL/C compiler, so you may be missing some libraries or you do not have LD_LIBRARY_PATH set correctly. Try executing this line before running "make":
export LD_LIBRARY_PATH=$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql:$LD_LIBRARY_PATHI compile the utils2_ak package on Linux all the time as my own system runs Ubuntu. OK, I just ran make on the package using CSDK 4.50.FC13W1 and it compiles with no errors. There are warnings, but all can be ignored. Most are complaining about sprintf targets being too small. That's not true, it is just that while the source strings or functions are defined as returning maximum string lengths that are wider than the target string, the actual source strings are NEVER longer than the targets.
Also, I do not know why your copy of esql is generating a .c file that references is8bitstr, as mine does not.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
Thanks Art for your help, I tried again, the issue still persists.
[informix@sandbox arts]$ (sandbox) export LD_LIBRARY_PATH=$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql:$LD_LIBRARY_PATH
[informix@sandbox arts]$ (sandbox) ./make
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o ul ul.ec -L/usr/lib/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `idx_getenv':
osenv.c:(.text+0x44): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `ggetenv_oledb':
osenv.c:(.text+0x169b): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osfutil.o): in function `_ofreadable':
osfutil.c:(.text+0x7c5): undefined reference to `gcvaccess'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osfullpath':
osdnet.c:(.text+0x27): undefined reference to `gcvaccess'
/usr/bin/ld: osdnet.c:(.text+0x51): undefined reference to `gcvchdir'
/usr/bin/ld: osdnet.c:(.text+0xbe): undefined reference to `gcvchdir'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osrealdbn':
osdnet.c:(.text+0x448): undefined reference to `gcvstat'
collect2: error: ld returned 1 exit status
make: *** [Makefile:97: ul] Error 1
[informix@sandbox arts]$ (sandbox) env|grep LD_LIB
LD_LIBRARY_PATH=/opt/informix/lib:/opt/informix/lib/esql:/opt/informix/lib:/opt/informix/lib/c++:/opt/informix/lib/esql[informix@sandbox arts]$ (sandbox) check_version csdk
Currently installed version: 4.50.FC13W1
[informix@sandbox arts]$ (sandbox) onstat -
IBM Informix Dynamic Server Version 14.10.FC10W2 -- On-Line -- Up 13:17:25 -- 10659156 Kbytes
2026-04-28 00:45:02
[informix@sandbox arts]$ (sandbox) uname -a
Linux sandbox.ifx.cloud 5.14.0-503.23.2.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Feb 7 15:07:19 EST 2025 x86_64 x86_64 x86_64 GNU/Linux
[informix@sandbox arts]$ (sandbox) cat /etc/os-releaseNAME="Red Hat Enterprise Linux"
VERSION="9.4 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.4 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://issues.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"
[informix@sandbox arts]$ (sandbox) ls -l dostats*
-rw-r--r-- 1 informix informix 278157 Apr 27 15:04 dostats.c
-r-xr-xr-x 1 informix informix 176702 Jan 7 2025 dostats.ec
-rw-r--r-- 1 informix informix 309121 Apr 28 00:42 dostats_ng.c
-r-xr-xr-x 1 informix informix 189734 Jan 14 10:04 dostats_ng.ec
-rw-r--r-- 1 informix informix 235224 Apr 27 14:52 dostats.o
[informix@sandbox arts]$ (sandbox) esql -o dostats dostats_ng.ec getopt.c
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `idx_getenv':
osenv.c:(.text+0x44): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `ggetenv_oledb':
osenv.c:(.text+0x169b): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osfutil.o): in function `_ofreadable':
osfutil.c:(.text+0x7c5): undefined reference to `gcvaccess'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osfullpath':
osdnet.c:(.text+0x27): undefined reference to `gcvaccess'
/usr/bin/ld: osdnet.c:(.text+0x51): undefined reference to `gcvchdir'
/usr/bin/ld: osdnet.c:(.text+0xbe): undefined reference to `gcvchdir'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osrealdbn':
osdnet.c:(.text+0x448): undefined reference to `gcvstat'
collect2: error: ld returned 1 exit status
[informix@sandbox arts]$ (sandbox) ./make -version
GNU Make 4.4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[informix@sandbox arts]$ (sandbox) ls -l /opt/informix/lib/esql/libifos.a
-rw-r--r-- 1 root root 246056 Dec 10 10:37 /opt/informix/lib/esql/libifos.a
------------------------------
ke chen
------------------------------
Ke:
OK,
is8bitstr is defined in libgen, libixgen, and a couple of others. The thing is that the esql script that is included with the CSDK version 4.50 includes those libraries so you should not be having this issue. Please make sure that your PATH is seeing the copy of esql that resides in $INFORMIXDIR/bin and not some older version that may have different libraries included. This may show the problem:
which esql
On my system, with the environment set to point to the v4.50 compiler (I also have v15.0 compiler and a couple of older ones installed for testing) I get:
$ which esql
/opt/informix//HCL_CSDK_4.50/bin/esqlIt is not enough to run "esql -V" because the esql script just passes that on to the binary compiler:
${INFDIR}/lib/esql/esqlc
which may be the correct version (as your previous post noted) but the esql script may be an older one earlier in your PATH. If that's not the problem try adding "-lifgen" to the command line:
esql -lifgen -o ul ul.ec getopt.c
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
Hi Art, Thanks for advice, yes, '-lifsql -lifasf -lifgen -lifos -lifgls -lifglx' did work, I can compile without error now. esql -o dostats2 dostats_ng.ec -lifsql -lifasf -lifgen -lifos -lifgls -lifglx ------------------------------ ke chen ------------------------------
Ke: Great! Just one thing. Those libraries should be included automatically by the esql script. Please make sure that you are running the copy of the script that is installed in $INFORMIXDIR/bin and not some older script that is elsewhere but earlier in your PATH. If so, deleting that older esql script or fixing your PATH to see the newest one first, will save you grief later on. Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
Hi Arts, I ran dostats on prod (dostats 2 -h ${INFORMIXSERVER} -m -v 2 -e -d ALL -Q 20 –p -P 0 -w 60), got some warning message as below: Warning: update statistics low using sampling may generate inaccurate index statistics for index xxxxxx due to data skew Can I safely ignore these? By the way, I had turned off AUS (auto update stats). ------------------------------ ke chen ------------------------------
This warning indicates that you have the USTLOW_SAMPLE parameter set to 1 in your ONCONFIG file. This can cause sharing of the low level stats generated to the sysindices table for some indexes. It does make processing LOW stats faster for very large indexes by only sampling the btree but can skew the stats produced that way. Anyway, the possibility of the skew issue, which is not week documented, is why the warning is there. You can safely ignore that warning, however if some queries against larger tables are not performing well, you can use the USTLOW_SAMPLE environment variable set to 0 to run dostats just for those tables without the sampling. The -i option can process a list of tables for that run and the -x option can be used to bypass those tables for the normal run. Use --force-run to force replacing the sampled stats the first time you run those tables with sampling disabled. Note that this is different from the SAMPLING option (-Z) that affected MEDIUM distributions. Art Art S. Kagel, President and Principal Consultant ASK Database Management www.askdbmgt.com Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
Hi Art,
It's been a couple of years since I last looked at this closely but I am sure that if you see the warning about sampling in the log what has happened is:
the engine has detected more skew in the column data than it will tolerate when sampling is used; so
it abandons sampling and starts again with a full scan of that index.
Therefore there would be no benefit in recollecting any statistics where you see the warning because the engine has already taken care of this. The main problem is the time and IO wasted attempting to collect statistics using the sampling method and then aborting. I worked with Jeff McMahon on this and it resulted in this RFE which suggests being able to set a flag at table level so that sampling can be better controlled.
https://ibm-data-and-ai.ideas.ibm.com/ideas/INFX-I-516
Ben.
------------------------------
Benjamin Thompson
------------------------------
This warning indicates that you have the USTLOW_SAMPLE parameter set to 1 in your ONCONFIG file. This can cause sharing of the low level stats generated to the sysindices table for some indexes. It does make processing LOW stats faster for very large indexes by only sampling the btree but can skew the stats produced that way. Anyway, the possibility of the skew issue, which is not week documented, is why the warning is there.
You can safely ignore that warning, however if some queries against larger tables are not performing well, you can use the USTLOW_SAMPLE environment variable set to 0 to run dostats just for those tables without the sampling. The -i option can process a list of tables for that run and the -x option can be used to bypass those tables for the normal run. Use --force-run to force replacing the sampled stats the first time you run those tables with sampling disabled.
Note that this is different from the SAMPLING option (-Z) that affected MEDIUM distributions.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog:
http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
Original Message:
Sent: 5/1/2026 11:48:00 PM
From: ke chen
Subject: RE: Need advice on compiling dostats utility
Hi Arts,
I ran dostats on prod (dostats 2 -h ${INFORMIXSERVER} -m -v 2 -e -d ALL -Q 20 –p -P 0 -w 60), got some warning message as below:
Warning: update statistics low using sampling may generate inaccurate index statistics for index xxxxxx due to data skew
Can I safely ignore these?
By the way, I had turned off AUS (auto update stats).
------------------------------
ke chen
------------------------------
Original Message:
Sent: Wed April 29, 2026 06:02 AM
From: Art Kagel
Subject: Need advice on compiling dostats utility
Ke:
Great! Just one thing. Those libraries should be included automatically by the esql script. Please make sure that you are running the copy of the script that is installed in $INFORMIXDIR/bin and not some older script that is elsewhere but earlier in your PATH. If so, deleting that older esql script or fixing your PATH to see the newest one first, will save you grief later on.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
Original Message:
Sent: Wed April 29, 2026 02:29 AM
From: ke chen
Subject: Need advice on compiling dostats utility
Hi Art,
Thanks for advice, yes, '-lifsql -lifasf -lifgen -lifos -lifgls -lifglx' did work, I can compile without error now.
esql -o dostats2 dostats_ng.ec -lifsql -lifasf -lifgen -lifos -lifgls -lifglx
------------------------------
ke chen
Original Message:
Sent: Mon April 27, 2026 10:27 AM
From: Art Kagel
Subject: Need advice on compiling dostats utility
Ke:
OK,
is8bitstr is defined in libgen, libixgen, and a couple of others. The thing is that the esql script that is included with the CSDK version 4.50 includes those libraries so you should not be having this issue. Please make sure that your PATH is seeing the copy of esql that resides in $INFORMIXDIR/bin and not some older version that may have different libraries included. This may show the problem:
which esql
On my system, with the environment set to point to the v4.50 compiler (I also have v15.0 compiler and a couple of older ones installed for testing) I get:
$ which esql
/opt/informix//HCL_CSDK_4.50/bin/esqlIt is not enough to run "esql -V" because the esql script just passes that on to the binary compiler:
${INFDIR}/lib/esql/esqlc
which may be the correct version (as your previous post noted) but the esql script may be an older one earlier in your PATH. If that's not the problem try adding "-lifgen" to the command line:
esql -lifgen -o ul ul.ec getopt.c
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
Original Message:
Sent: Mon April 27, 2026 08:51 AM
From: ke chen
Subject: Need advice on compiling dostats utility
Thanks Art for your help, I tried again, the issue still persists.
[informix@sandbox arts]$ (sandbox) export LD_LIBRARY_PATH=$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql:$LD_LIBRARY_PATH
[informix@sandbox arts]$ (sandbox) ./make
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o ul ul.ec -L/usr/lib/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `idx_getenv':
osenv.c:(.text+0x44): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `ggetenv_oledb':
osenv.c:(.text+0x169b): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osfutil.o): in function `_ofreadable':
osfutil.c:(.text+0x7c5): undefined reference to `gcvaccess'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osfullpath':
osdnet.c:(.text+0x27): undefined reference to `gcvaccess'
/usr/bin/ld: osdnet.c:(.text+0x51): undefined reference to `gcvchdir'
/usr/bin/ld: osdnet.c:(.text+0xbe): undefined reference to `gcvchdir'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osrealdbn':
osdnet.c:(.text+0x448): undefined reference to `gcvstat'
collect2: error: ld returned 1 exit status
make: *** [Makefile:97: ul] Error 1
[informix@sandbox arts]$ (sandbox) env|grep LD_LIB
LD_LIBRARY_PATH=/opt/informix/lib:/opt/informix/lib/esql:/opt/informix/lib:/opt/informix/lib/c++:/opt/informix/lib/esql[informix@sandbox arts]$ (sandbox) check_version csdk
Currently installed version: 4.50.FC13W1
[informix@sandbox arts]$ (sandbox) onstat -
IBM Informix Dynamic Server Version 14.10.FC10W2 -- On-Line -- Up 13:17:25 -- 10659156 Kbytes
2026-04-28 00:45:02
[informix@sandbox arts]$ (sandbox) uname -a
Linux sandbox.ifx.cloud 5.14.0-503.23.2.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Feb 7 15:07:19 EST 2025 x86_64 x86_64 x86_64 GNU/Linux
[informix@sandbox arts]$ (sandbox) cat /etc/os-releaseNAME="Red Hat Enterprise Linux"
VERSION="9.4 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.4 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://issues.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"
[informix@sandbox arts]$ (sandbox) ls -l dostats*
-rw-r--r-- 1 informix informix 278157 Apr 27 15:04 dostats.c
-r-xr-xr-x 1 informix informix 176702 Jan 7 2025 dostats.ec
-rw-r--r-- 1 informix informix 309121 Apr 28 00:42 dostats_ng.c
-r-xr-xr-x 1 informix informix 189734 Jan 14 10:04 dostats_ng.ec
-rw-r--r-- 1 informix informix 235224 Apr 27 14:52 dostats.o
[informix@sandbox arts]$ (sandbox) esql -o dostats dostats_ng.ec getopt.c
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `idx_getenv':
osenv.c:(.text+0x44): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osenv.o): in function `ggetenv_oledb':
osenv.c:(.text+0x169b): undefined reference to `is8bitstr'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osfutil.o): in function `_ofreadable':
osfutil.c:(.text+0x7c5): undefined reference to `gcvaccess'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osfullpath':
osdnet.c:(.text+0x27): undefined reference to `gcvaccess'
/usr/bin/ld: osdnet.c:(.text+0x51): undefined reference to `gcvchdir'
/usr/bin/ld: osdnet.c:(.text+0xbe): undefined reference to `gcvchdir'
/usr/bin/ld: /opt/informix/lib/esql/libifos.a(osdnet.o): in function `_osrealdbn':
osdnet.c:(.text+0x448): undefined reference to `gcvstat'
collect2: error: ld returned 1 exit status
[informix@sandbox arts]$ (sandbox) ./make -version
GNU Make 4.4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[informix@sandbox arts]$ (sandbox) ls -l /opt/informix/lib/esql/libifos.a
-rw-r--r-- 1 root root 246056 Dec 10 10:37 /opt/informix/lib/esql/libifos.a
------------------------------
ke chen
Original Message:
Sent: Mon April 27, 2026 06:53 AM
From: Art Kagel
Subject: Need advice on compiling dostats utility
Ke:
First, dostats.ec is the OLD version of the source, suitable for servers earlier than v10.00. You need to compile the dostats_ng.ec instead with:
esql -o dostats dostats_ng.ec getopt.c
I will look into that pointer comparison error in the old code anyway, but you should not be using it. It will work once compiled, but it is missing newer features including updates to the algorithms it uses to work out what UPDATE STATISTICS commands to execute.
As far as the problem compiling ul.ec and that process complaining about
is8bitstr, that call is not in the code itself and is being inserted by the ESQL/C compiler, so you may be missing some libraries or you do not have LD_LIBRARY_PATH set correctly. Try executing this line before running "make":
export LD_LIBRARY_PATH=$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql:$LD_LIBRARY_PATHI compile the utils2_ak package on Linux all the time as my own system runs Ubuntu. OK, I just ran make on the package using CSDK 4.50.FC13W1 and it compiles with no errors. There are warnings, but all can be ignored. Most are complaining about sprintf targets being too small. That's not true, it is just that while the source strings or functions are defined as returning maximum string lengths that are wider than the target string, the actual source strings are NEVER longer than the targets.
Also, I do not know why your copy of esql is generating a .c file that references is8bitstr, as mine does not.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
Original Message:
Sent: Sun April 26, 2026 09:38 PM
From: Paul Watson
Subject: Need advice on compiling dostats utility
is8bitstr gcvaccess gcvchdir gcvstat are all GLS AFAIK
Try something like
esql -o dostats dostats.ec -L/opt/informix/lib -L/opt/informix/lib/esql -lifgls
On 4/26/2026 8:24 PM, ke chen via IBM Community wrote:
0100019dcc89ae51-343db245-953c-4655-87d9-1a2de47c4271-000000@email.amazonses.com
">
Tried to compile Art's latest dostats on a linux x86_64 machine, however both make and 'esql -o' got below errors, I am not too sure if I missed...
Ben: You are correct that this was a message in the message log. I had it in my head that it was coming from dostats as one of the warnings that it puts out, but it is not. I'm not convinced that the engine will have regenerated the LOW stats without sampling when you have seen this message. I still would want to redo the LOWs at least with the USTLOW_SAMPLE set to zero in the runtime environment. Any comments on this from the Informix Dev team? Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
Hi Art,
When I ran this command (dostats 2 -h prdweb -m -v 2 -e -d ALL -Q 20 -p -P 0 -w 60),
I got two warnings that I don't really understand why:
dostats says "Extra arguments ignored!", I checked the syntax, I don't see any reason why it gives that warning.
2. it says "Only Stored Procedures will be processed." , and it does not run update stats on tables.
Is it because of the followings?
$ (prdweb/primary) onstat -c|grep AUTO_STAT_MODE
AUTO_STAT_MODE 0
$ (prdweb/primary) onstat -c|grep STATCHANGE
STATCHANGE 10I tried to set USTLOW_SAMPLE in environment variable to 0 (it's set to 1 in ONCONFIG),
then re-run same dostats command,
but I get same result ( it only update stored procedures).
=====log:
Extra arguments ignored!
dostats_ng: Features Version 7.00 - NG, Source Revision: 1.92 !
Copyright 2009 - 2025 by Art S. Kagel.
License for private usage (including use by commercial enterprise
for its own needs) is granted. Commercial and exploitation rights
are reserved.
Verbose mode level 2 ENABLED....
ISOLATION LEVEL: COMMITTED READ.
Isolation settings ignored for non-logged databases!
Initially drop distributions DISABLED...
Stored Procedure processing ENABLED....
Default PDQ priority for procedures set to: 0.
Shared Memory Connection handling DISABLED...
Expanded Reporting ENABLED....
Force Distributions Only DISABLED...
Distributions Only clauses ENABLED....
System catalog processing ENABLED....
Table Name Template NOT SUPPLIED...
Only Stored Procedures will be processed.
Host Name SUPPLIED (prdweb)...
Target Host Name NOT SUPPLIED, targeting host.
Command Execution IMMEDIATE...
Lock mode set to wait 60 seconds.
Connecting DBASES to @prdweb at 1788.
Connecting TARGET to @prdweb at 1990.
Connecting WORK to @prdweb at 2025.
PDQPRIORITY for table processing set to: 20.
Distribution Aging limit set to: 30 days
Table browse threshhold set to: 15.000000%
------------------------------
ke chen
------------------------------
Art,
It can be observed by monitoring the Informix partition profiles while 'update statistics' is running.
By all means IBM development can confirm or deny but I think I have already done this.
This was part of a big look at update statistics I did with Jeff in 2022/23 and it was a significant amount of work for both of us. It resulted in quite a few bug fixes, mostly concerning fragment-level statistics or errors that could be encountered with large tables. Another was to fix the inability to interrupt a HIGH mode statement running for some time with "onmode -z". I digress a bit. I also raised a number of RFEs around update statistics to address some of its quirks, of which this is one. Jeff inspected the source code in all cases. I have a long series of emails on this topic through lab advocacy. I can share a bit more but this is off the topic of this thread somewhat.
Unfortunately everything classified as a bug was fixed but the RFEs are still outstanding.
Another interesting insight is that the sort data calculation you see when you do a SET EXPLAIN STATISTICS on HIGH/MEDIUM mode statements is quite misleading and irrelevant if indices are used for sorting, which is way more efficient than using PDQ, table scans and large in-memory or to-disk sorts. This is possible for all leading index columns.
The full list is here:
https://ibm-data-and-ai.ideas.ibm.com/ideas/INFX-I-515
- Allow more than 50 MB for UPDATE STATISTICS MEDIUM/HIGH sort operations
https://ibm-data-and-ai.ideas.ibm.com/ideas/INFX-I-516
- Avoid UPDATE STATISTICS [LOW] sampling failures due to data skew
https://ibm-data-and-ai.ideas.ibm.com/ideas/INFX-I-517
- Do not allocate MGM memory to UPDATE STATISTICS MEDIUM/HIGH with PDQ if index is used for sort
https://ibm-data-and-ai.ideas.ibm.com/ideas/INFX-I-518
- Sort data calculations should not be used to determine number of passes for UPDATE STATISTICS MEDIUM/HIGH statements where an index is used, fix misleading explain output
https://ibm-data-and-ai.ideas.ibm.com/ideas/INFX-I-519
- UPDATE STATISTICS MEDIUM/HIGH with PDQ should favour use of indices for sort when more than one column is specified
As I say, the validity of all these was verified by Jeff by source code inspection.
Ben.
------------------------------
Benjamin Thompson
------------------------------
Ke: The extra argument is the "2" immediately following "dostats". The reason that tables were not processed because you specified the -p option. As noted in the Usage output, -p disables table processing unless you also include the -t or -i options to explicitly request one or more tables to be processed. The -p basically says "Only compile stored routines!" Normally you do not need to specify -p because procedures are always processed after tables have completed for each Database. Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------