Great Circle Associates Majordomo-Users
(March 1997)

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: list monitor
From: Bonnie Scott <bonnie @ staff . prodigy . com>
Date: Mon, 3 Mar 1997 16:34:34 -0500 (EST)
To: kenr @ troi . cc . rochester . edu (Ken Rich)
Cc: majordomo-users @ GreatCircle . COM
In-reply-to: <> from "Ken Rich" at Feb 28, 97 06:30:13 am

> before i hack away does anyone have a quickie for monitoring lists
> traffic?  mostly i want to detect dead lists, but also to monitor
> some high-membership lists who have promised to be low-traffic.
> --
> -ken rich             *generic_disclaimer*   


This is not the most gorgeous code I've written, but... here it is.  Hope
it's not too late.

It assumes a file, "listdata," that for me contains lists of lists "moderated,"
"unmoderated", "sensitive," "internal," (all mutually exclusive), and
"testing" (which incudes those lists that are :).  It prints out to STDOUT.

Bonnie Scott
Prodigy, Inc.

-------  ------


push(@INC, "/majordomo/create");

$archive_dir = "/majordomo/archive";

undef @intesting;

foreach $list (@test) {
   $intesting{$list} = "True";

opendir(DIR, $archive_dir) || die ("Unable to open archive directory");
@files = readdir(DIR);

print "\n * Moderated Lists:\n";

foreach $listname (@moderated) {

print "\n * Unmoderated Lists:\n";
foreach $listname (@unmoderated) {

print "\n * Sensitive Lists:\n";

foreach $listname (@sensitive) {

print "\n * Internal Lists:\n";

foreach $listname (@internal) {


######## Subfunction(s) #########

sub checkitout {
  print "$listname: ";
  if (!$intesting{$listname}) {
    @arcs = grep(/^$listname\./, @files);
    if (@arcs) {
      undef @months;
      foreach $month (sort @arcs) {
        $month =~ s/$listname\.96/96/;
        $month =~ s/$listname\.97/97/;
        $month =~ s/$listname\.98/98/;
        $month =~ s/$listname\.99/99/;
        $month =~ s/$listname\.00/00/;
     # if this script is still in use in 2001, that's OK.... the output will
     # just not be as compact
        push (@months, $month);
      print ("Had activity during @months.");
      $l = pop(@months);
      @lastmod = stat("$archive_dir/$listname.$l");
# Figure out last modified time and make it human-readable
               = localtime($lastmod[9]);
       $m = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$mon];
      $lastpost = ("$mday $m, $year at $hour:$min");
      print ("\n       Last post: $lastpost\n");
      } else {
      print ("Has not had ANY recent activity.\n");
    } else {
      print ("is in testing.\n");

Indexed By Date Previous: Majordomo 1.94.1 error
From: (Reg Dwyer)
Next: Bounce Lists
Indexed By Thread Previous: Majordomo 1.94.1 error
From: (Reg Dwyer)
Next: newsgateway help
From: Gabriel Millerd <>

Search Internet Search