[fwAnalog] fwanalog New module for ZyXEL, and what order should log lines be in?

From: Timothy Lyons <timl~AT~kulath.demon.co.uk>
Date: Tue Jan 23 2007 - 00:48:37 CET


I have created a new parse module to convert the emailed output from ZyXEL P-660WH-T1 ADSL modem/wireless/router, and it works very nicely the first time producing a nice analysis.

However, the fwanalog.all.log file ends up with the most recent entries at the top and the oldest at the bottom, which as I read the shell script is the reverse to what is expected by the sed routines which appends new entries to old ones.

The comment in the fwanalog.opts file says: inputfiles=`find $inputfiles_dir -maxdepth 1 -name "$inputfiles_mask" -mtime -$inputfiles_mtime | sort -r`
# This should find the names of the logfiles you want to parse
# It MUST return the names in reverse order (chronologically) or you
# will have LOTS of duplicate lines in your log.

and I understand that this should return the files with the NEWEST file first, and the oldest last. That is what I understand by reverse chronological order - oldest then newest would be forward chronological order.

I don't know enough about the naming of the files that it might expect normally to process to know whether this is just a simple misunderstanding or there is something more subtle.

Can someone advise?

There will (I suspect) be a slight problem with the processing anyway, because within each file (which only contains exactly 128 records), the oldest records are at the bottom, and the newest at the top. Therefore if I want to have a file with the oldest at the top and the newest at the bottom, I will have to reverse each file and then concatenate them starting with the oldest file (or do a more complex date/time sort on the whole file).

Background.
I have the modem configured so that it is connected to the internet permanently. The modem router can be configured to email each group of log file entries when 128 have been accumulated. I configure so that the email goes to the SMTP server at my ISP, then when I next connect my computer, I pick up the email, and I have a rule that places it in a specific directory. Fwanalog can then process this directory and produce the report.

regards,
Tim Received on Tue Jan 23 00:48:42 2007

This archive was generated by hypermail 2.1.8 : Mon Mar 19 2007 - 16:22:03 CET