Input log written to $TMPDIR
Joost van Baal
joostvb at logreport.org
Tue Dec 28 22:28:19 CET 2004
Hi Raymond,
On Tue, Dec 28, 2004 at 12:08:25AM +0100, Raymond Page wrote:
> I'm curious why the log that I provide as input to lr_log2report
> is written to $TMPDIR. If the log file is being recorded to a
> dlf, can't it just process the log in place and write only to the
> temporary dlf store?
>
> I ask because I'm processing gigabyte sendmail logs. Having a 1GB
> log file written decompressed to tempspace and then written into
> the SQLite database seems like somewhere there's extra work being
> done which is using a lot of disk space.
It seems copying the raw logfile to $TMPDIR/logfile is done in
&Lire::LrCommand::handle_logfile . This was introduced 2004-08-30,
after Lire 1.5, with the reimplementation in Perl of lots of small
stand-alone utilities (lr_check_prereq, lr_dlf2xml, lr_inflate,
lr_log2xml, lr_store, lr_xml2ascii, lr_xml2chart, ...).
&Lire::LrCommand::import_log calls Lire::ImportJob, which is passed a
file ( pattern => $self->{'_logfile'} ); see Lire::ImportJob(3pm).
Hrm...
Could you try to give your uncompressed logfile as an argument to
lr_log2report, and not pass it via STDIN? I believe passing just the
filename makes Lire skip the copy-to-tmpfile step.
Once I know this, I'll think about documenting this behaviour (it sure
needs to be documented.)
Bye,
Joost
--
. . http://logreport.com/
| '.| /^LogReport$/
| Lire http://logreport.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.logreport.org/pipermail/questions/attachments/20041228/0cf2057e/attachment.bin
More information about the Questions
mailing list