Re: (Fwd) Re: Informix Message Log
Posted in 1996
Ravi Joseph Pinto (ravi@in.DHL.COM) wrote:
: Hi,
: I am not sure if the first posting made thru !!!
: Ravi...
: ----------------------------------------------------------------------------------------
: On 30 Jul 96 , Richard Thomas <r.thomas@csl.gov.uk> wrote
: } John Morton wrote:
: } >
: } > Does anybody have a slick way of handling the informix message log?
: } > I'd like to spin it off into a separate file daily, but I'm not sure
: } > how to go about it. Right now it's just getting bigger and bigger ...
: } > Regards,
: } >
: }
: } Hi John,
: }
: } You don't say what OS you're using, but if you're on UNIX (SunOS in
: } my case) you could adapt what I do with my SP trace files. I've got
: } a script that uses tar to get them all into one file, then saves
: } that file in a separate directory, named with today's date. As the
: } log is just one file, you don't even need tar - just move (mv) the
: } file, renaming it using the date command.
: }
: } eg
: }
: } #!/bin/sh
: } cd /online (subbstitute your own $INFORMIXDIR here)
: } mv online.log log_archive/`date '+%d-%m-%y'`
: Shouldn't the OnLine be shutdown before moving the message file to
: archive area , keeping in mind that oninit / tbinit is constantly writing to
: the file ???
Well, oninit isn't "constantly" writing to this file. (Unless you've got
some serious problem going on.) The file gets opened, written to, and closed
each time a message is written. So the file shouldn't usually be open.
: } rm online.log
: }
: } Save the above as a file with execute permission, create
: } $INFORMIXDIR/log_archive, and set up a daily crontab job which runs
: } the script.
: }
: } Hope this helps,
: }
: } Richard.
: } \