View Only
  • 1.

    Posted Thu March 25, 2021 09:06 AM

    I really like having my Informix log in separate files for each day, like this:


    -rw-rw-r--.  1 informix informix   2407 Mar 19 23:00 online-21-03-19.log

    -rw-rw-r--.  1 informix informix   2408 Mar 20 23:00 online-21-03-20.log

    -rw-rw-r--.  1 informix informix   2688 Mar 21 23:00 online-21-03-21.log

    -rw-rw-r--.  1 informix informix   2406 Mar 22 23:00 online-21-03-22.log

    -rw-rw-r--.  1 informix informix   4527 Mar 23 23:00 online-21-03-23.log

    -rw-rw-r--.  1 informix informix  10436 Mar 24 16:56 online-21-03-24.log


    I accomplish this with the following lines, which I have in a shell script that I named ""



    . /etc/profile


    # Give the Informix log a new name based on today's date.

    # This script runs just after midnight every night.


    dateinfo=`date +"%y-%m-%d"`

    onmode -wf MSGPATH=$INFORMIXDIR/online-$dateinfo.log




    The cron job that runs this shell script:

    1 0 * * * /home/informix/shells/  > /dev/null 2>&1




    John Dargan, Database Administrator II - Information Technology

    LAURA E. ROTH, Clerk of the Circuit Court

    Seventh Circuit, Volusia County, Florida

    Phone: 386-822-5004



    Have I helped you today? Please take the Survey!






  • 2.  RE:

    IBM Champion
    Posted Thu March 25, 2021 09:17 AM
    Great post and sharing!

    For what it's worth, there is a Task Manager task, "online_log_rotate", that does this for you and you can set the frequency of the message log change and the maximum number of history logs to keep before deleting older ones.


    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.

  • 3.  RE:

    IBM Champion
    Posted Thu March 25, 2021 09:50 AM
    Neat but you can do the same thing with logrotate


    Paul Watson
    Oninit LLC
    Oninit®️ is a registered trademark of Oninit LLC