Liste de diffusion Message #14844
De: Bill Cole <>
Sujet: Re: Log scraper
Date: Wed, 1 Dec 2004 09:30:11 -0500
A: SIMS Discussions <>
At 9:51 PM -0500 11/30/04, David C King  imposed structure on a stream of electrons, yielding:

I'm running SIMS on OS9.

Any chance of getting a copy of your log scraper - I wouldn't mind digging deeper into my logs. If nothing else, I'll learn a bit more about how the mail server works!

The log scraper I have in its current form isn't really usable on OS9. It isn't really clear code, the commenting is sparse and snarky, and the entire documentation is in the script itself, as follows:

# This script chews through SIMS logs in Mac text format (CR line ends)
# and spits out 2 files in Unix text format (LF line endings):
#   1. A summary of SMTP error events (just the lines with the SMTP errors
#      themselves)
#   2. All of the SMTP sessions associated with the lines in (1) sorted and
#      segregated by SMTP session.
# Along the way, it spits out progress and elapsed time info on stdout.
# The source log files MUST come from a SIMS server running with the SMTP
# module logging at level 4 or level 5. The key lines are level 4 events,
# so if you are not logging them, this script will never see one.
# Early versions of this script were written in MacPerl and worked on
# MacOS 8. This version has been ported to standard perl, then hacked up
# some more to deal with edge cases and volume issues, leaving the issue
# of back-port to a 'classic' MacOS with MacPerl unconsidered. The irony
# of a SIMS tool that cannot run on a system capable of running SIMS is not
# unappreciated by the author. (I have my SIMS logs in a directory shared out
# from a MacOS X system, where this script runs.)
# This software was never really designed, so it cannot really have design
# flaws. It has structure that is sub-optimal and code that is laughable.

You can find it at and should note that the license is a bit of an evil mutant spawn of the GPL which in fact does all those mean things Microsoft accuses the GPL of.

Making the script work as a MacPerl script on the actual machine running SIMS should just be a matter of a different #! line, switching the name of the log folder, fiddling with the bits where I modify $/ to do whatever would work, and substituting some alternate mechanism for a hostname lookup that I just do with a backticked 'dig'  command.

Bill Cole                        

S'abonner aux messages S'abonner aux sommaires S'abonner aux indexes Se désabonner Ecrire un email au responsable de la liste