Diff for /loncom/debugging_tools/login_count.pl between versions 1.3 and 1.4

version 1.3, 2004/09/08 19:41:23 version 1.4, 2005/03/30 17:18:04
Line 16  sub only_user_activitylog_files { Line 16  sub only_user_activitylog_files {
   
 my %data;  my %data;
 my $numusers;  my $numusers;
   my %machine;
 sub process_activitylog_file {  sub process_activitylog_file {
     if ($File::Find::dir=~m|/\d/\d/\d/|) { return; }      if ($File::Find::dir=~m|/\d/\d/\d/|) { return; }
     if ($_ ne 'activity.log') { return; }      if ($_ ne 'activity.log') { return; }
Line 24  sub process_activitylog_file { Line 25  sub process_activitylog_file {
     my $user=(split('/',$File::Find::dir))[-1];      my $user=(split('/',$File::Find::dir))[-1];
     while (my $line=<FILE>) {      while (my $line=<FILE>) {
  if ($line !~ /Login/) { next; }   if ($line !~ /Login/) { next; }
  my ($date)=split(':',$line,2);   my ($date,$machine)=split(':',$line,3);
  if ($date > $start_time) { push (@{$data{$date}},$user); }   if ($date > $start_time) { push (@{$data{$date}},$user); }
    $machine{$machine}++;
     }      }
     if ($numusers%100 == 0) {      if ($numusers%100 == 0) {
  print "\b\b\b\b\b\b\b\b\b\b\b\b\b\bDid $user";   print "\b\b\b\b\b\b\b\b\b\b\b\b\b\bDid $user";
Line 52  sub print_data { Line 54  sub print_data {
     print("$key -> $byday{$key}\n");      print("$key -> $byday{$key}\n");
     }      }
     print("total -> $total_login\n");      print("total -> $total_login\n");
       print("\nMachine Logins\n");
       foreach my $key (sort(keys(%machine))) {
    print("$key \t-> $machine{$key}\n");
       }
 }  }
   
 $|=1;  $|=1;

Removed from v.1.3  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>