source: server/common/oursrc/logview/logview.pl @ 138

Last change on this file since 138 was 138, checked in by jbarnold, 17 years ago
added logview package; fixed signup homedir
  • Property svn:executable set to *
File size: 687 bytes
Line 
1#!/usr/bin/perl -T -w
2
3%ENV = ();
4$ENV{'PATH'} = '/bin:/usr/bin';
5my $elogsrc = '/var/log/httpd/error_log';
6#my $alogsrc = '/var/log/httpd/access_log';
7# get by uid the caller's name to find the corresponding locker name
8my $caller = (getpwuid $<)[0];
9$\ = "\n";
10
11print "--- Error logs for $caller ---";
12open FOO, $elogsrc;
13my @elogs = <FOO>;
14close FOO;
15# Prevent deviousness, like web_scripts directories within web_scripts
16my @el = grep((m|/([^/]+)/web_scripts/| && $caller eq $1), grep(m|/afs/athena.mit.edu/|, @elogs));
17print @el;
18
19#print "--- Access logs for $caller ---";
20#open FOO, $alogsrc;
21#my @alogs = <FOO>;
22#close FOO;
23#my @al = grep(m|\"GET /~$caller|, @alogs);
24#print @al;
Note: See TracBrowser for help on using the repository browser.