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 "change_MSGPATH.sh"
#!/bin/sh
. /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/change_MSGPATH.sh > /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! |