PMDFLOG.PL (a Perl Script)

PMDF can be configured to record a large volume of information in the mail.log file. Interpreting the contents of this file has, and will continue to be, left up to various sites, as what is considered important varies from site to site.

Tom Wade (T.Wade@vms.eurokom.ie) has maintained a program, PMDF-Stats that interprets information in the log file for quite some time. Being a VMS guy, Tom makes PMDF-Stats available as a VMS saveset, which isn't terribly useful to the Unix folk out there. If you're interested in PMDF-Stats, go here.

Partly to address this issue, but mostly as an excuse to play around with Perl, I wrote a script that does some interpretation of the mail.log file. Along the way I discovered that the log file is a tricky beast. Like most of PMDF, it is very configurable, and I didn't come up with a way to generically handle any mail.log file that might exist. Instead, I wrote a script to handle what is likely to be a fairly common setup. If your log file format is 1 (the default), and you are not logging things like process ID's (LOG_PROCESS=1) or headers (LOG_HEADER=1) then this script may work for you.

You will almost certainly wish to modify the script. I have no idea what people want to see in a summary of the log file; I simply picked some things at random and print them out. In addition, the Perl hackers out there will doubtless find many ways to improve the script as it stands.

Perl is available for all platforms that PMDF sites are likely to be interested in: Solaris, Tru64 Unix, NT, and yes, OpenVMS. Check http://www.perl.com/ for info on where to get the latest distribution, as well as tons of other goodies. The definitive reference for Perl is the "Camel Book", aka Programming Perl by Larry Wall, Tom Christiansen and Randal L. Schwartz. It's published by O'Reilly & Associates.

Anyway, the script is here.

Updates

  • 15 December 97 - Added support for Y records. Thanks to Chris Pappagianis for this one.
  • 15 December 97 - Added channel delay time processing.
  • 16 December 97 - Added host delay time processing.
  • 17 December 97 - Fixed a couple of bugs: failed connections weren't getting counted correctly; remove leading space from dates with single-digit days. Also did some minor efficiency enhancements.
  • 22 December 97 - Added handling for F records with mailserv channels and A records with IMAP servers
  • 29 December 97 - Added message size bins
  • 31 December 97 - Added per-hour message count reporting
  • 7 January 98 - Redid the message delay handling. Delays are now binned on a per-channel and per-host basis. No averaging is done.
  • 18 February 98 - Added big message source output
  • 6 March 98 - Cleaned up some printing ugliness; changed the format of printed enqueue statistics.
  • 26 March 98 - Fixed a bug in the big message source records. If a message had an empty envelope from address, it would show up as from the person it was to.

Disclaimer

This script is provided on an "as-is" basis and is not supported in any way by Process Software.

Search: