Milan:
No, the engine does not keep the message log open, it opens the log, writes a message, then closes the log file.
It is, as Andreas stated, and I had implied in an earlier post, only necessary to rename or delete the current message log file and the engine will just create a new one. Witness:
informix@Gandolf:~$ ls -l /opt/informix/infmx/tmp/online.elendil.log*
-rw-rw-r-- 1 informix informix 1107167 Sep 29 10:26 /opt/informix/infmx/tmp/online.elendil.log
informix@Gandolf:~$ mv /opt/informix/infmx/tmp/online.elendil.log /opt/informix/infmx/tmp/online.elendil.log.1
informix@Gandolf:~$ onmode -c
informix@Gandolf:~$ dir /opt/informix/infmx/tmp/online.elendil.log
-rw-rw-r-- 1 informix informix 361 Sep 29 10:28 /opt/informix/infmx/tmp/online.elendil.log
informix@Gandolf:~$ cat /opt/informix/infmx/tmp/online.elendil.log
09/29/2025 10:28:51 Checkpoint Completed: duration was 0 seconds.
09/29/2025 10:28:51 Mon Sep 29 - loguniq 4106, logpos 0x76e020, timestamp: 0x11db153da Interval: 23481 Phypos 0xbe9fa
09/29/2025 10:28:51 Maximum server connections 0
09/29/2025 10:28:51 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 92, Llog used 174
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com------------------------------
Original Message:
Sent: Mon September 29, 2025 10:20 AM
From: Milan Rafaj
Subject: Purge informix log file
Hello Andreas,
Does not engine remember opened file descriptor of renamed online.log and continue writing messages into it, the same problem with deleting file?
We are using
cat online.log|gz ...
and then
cat /dev/null >online.log
Milan Rafaj
Senior Lead, Infrastructure/Cloud Architecture
Kyndryl Consult
+420 737 264 248
www.kyndryl.cz
Planned absence/Plánovaná nepřítomnost: 22-26.9., 1-3.10.2025
Kyndryl Česká republika, spol. s r. o.
Sídlo: Praha 4, Chodov, V Parku 2308/8, PSČ: 148 00,
IČ: 14890992
Zapsaná v obchodním rejstříku, vedeném Městským soudem v Praze (oddíl C, vložka 339277)
Registered address: Prague 4, Chodov, V Parku, 2308/8, Zip code: 148 00
Company ID: 14890992
Entered in the Commercial Register maintained by the Municipal Court in Prague (Part C, Entry 339277)
Original Message:
Sent: 9/29/2025 9:41:00 AM
From: Andreas Legner
Subject: RE: Purge informix log file
The rename (mv) alone should do. The next message created by the server will automatically re-create the file.
------------------------------
Andreas Legner
Informix Dev
HCL Software
Original Message:
Sent: Sat September 27, 2025 02:40 AM
From: Syed Hussaini
Subject: Purge informix log file
Thank you all for the wonderful suggestions & will definitely try out those in non-prod environment. Meanwhile, I find the below suggestion from chatgpt on this topic. Please let me know if this also works.
mv $INFORMIXDIR/tmp/online.log $INFORMIXDIR/tmp/online.log.old
touch $INFORMIXDIR/tmp/online.log
chmod 660 $INFORMIXDIR/tmp/online.log
Thanks again.
------------------------------
Syed Hussaini
Original Message:
Sent: Wed September 24, 2025 09:03 PM
From: Art Kagel
Subject: Purge informix log file
Syed:
You can set up message log rotation, specifying the number of older copies to keep and how frequently to create a new log file in the engine. You can also set up a cron job to do that using OS features. Finally you can just rename the file or delete it and Informix will just create a new one the next time it has to wrote to the message log.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
Original Message:
Sent: Tue September 23, 2025 01:36 AM
From: Syed Hussaini
Subject: Purge informix log file
Hi Experts,
Our informix log file (which outputs from onstat -m or MSGPATH parameter in onconfig) isn't purged since years &7 has grown in size. Please help how to purge this file & does this requires shutdown. Any risk to DB if done in improper way?
Thanks in advance
Syed H
------------------------------
Syed Hussaini
------------------------------