[JaxPM] log checking script once again

Nate Campi nate at campin.net
Wed Jun 14 23:32:12 CDT 2000


On the jacksonville-pm-list; Jax.PM'er Nate Campi <nate at campin.net> wrote -

> On the jacksonville-pm-list; Jax.PM'er Bill Jones <bill at fccj.org> wrote
-
>
> Hmmm, maybe I am missing something?
>
> Did you see the way I get the date out of logs?

Bill,

I don't see that your log scanning script is chopping up the actual
message the way mine does (maybe you could incorporate my technique into
your script to compact the output).

Yours prints the message unmodified into an email.

Mine can't print the message to a file as it finds it, since it's whole
purpose is to find matches later in the logs, and append it's time into
it's time entry. Only when it's done with all the logs does it print out
the hashes to individual files.

You see what I mean? 

My technique does this:

Jun 14 21:26:43 scampi postfix/smtpd[2552]: connect from skitzo[63.198.180.27]

My script takes the above entry, and puts everything from "scampi" to the
end of the string into the key of a hash. The time is put into the value
(well, actually it puts a comma, a space and then the time, but that's not
important).

I need a good way to put the month and day into this hash.

--
Nate


Jax.PM Moderator's Note:
This message was posted to the Jacksonville Perl Monger's Group listserv.
The group manager can be reached at -- owner-jacksonville-pm-list at pm.org
to whom send all praises, complaints, or comments...




More information about the Jacksonville-pm mailing list