Luke Mewburn <lukem(a)cs.rmit.edu.au> writes:
> This is *damned* annoying. With 2500 students all hammering one
> of my filers (a F330 in this case), we generally get /etc/messages.?
Yep, we see the same thing here. Here's a trivial Perl script I run
the end of the week autosupport mail through which boils the messages
portion down to a more readable form. It certainly could be made to do
more sophisticated tricks. Here's the output:
-----------------
==== Quota exceeded ====
achervin bdowling csaia frodo jack138 jeffno johan jsl santana stellato
==== Tree quota exceeded ====
proj
==== Unknown messages ====
Sun Mar 28 00:00:06 EST [asup_main]: System Notification mail sent
Sun Mar 28 01:00:01 EST [raid_scrub_admin]: Beginning disk scrubbing...
Sun Mar 28 02:36:03 EST [consumer]: Scrub found 0 parity inconsistencies
Sun Mar 28 02:36:03 EST [consumer]: Scrub found 0 media errors
Sun Mar 28 02:36:03 EST [consumer]: Disk scrubbing finished...
Mon Mar 29 00:24:09 EST [tn_login_0]: Login from host: amber
Mon Mar 29 19:23:03 EST [isp2100_main]: Disk 0a.18(0xfffffc0000be06f0): opcode=0x2a sector 0 not ready - Drive spinning up (2 4, 1)
Mon Mar 29 19:24:00 EST [isp2100_main]: Disk 0a.18(0xfffffc0000be06f0): request failed after retry #20
Mon Mar 29 19:24:00 EST [raid_stripe_owner]: Write on data disk 0a.18 in volume proj, RAID group 0, failed; reverting to degraded mode.
Mon Mar 29 19:24:04 EST [raid_stripe_owner]: Write on data disk 0a.18 in volume proj, RAID group 0, failed; entered degraded mode.
Mon Mar 29 19:24:04 EST [raid_stripe_owner]: One disk is missing from volume proj, RAID group 0.
A "hot spare" disk is available and the missing disk
will be reconstructed on the spare disk.
-------------
And here's the script:
-----------
#!/usr/local/bin/perl
# parse netapp autosupport mail and show it to us nicely
use Text::Wrap;
while (<>){
last if (index($_,"===== MESSAGES =====") > -1);
}
while($_ = <>){
next if /\[statd\]/;
next if (index($_,"last message repeated") > -1);
next if (index($_,"../common/ndmpd/comm.c") > -1);
if (/uid\s(\d+).*exceeded on volume (.*)/){
$user = ((exists $users{$1}) ? $users{$1} : $users{$1}=getpwuid($1));
$volume = $2;
$quotabloat{$user} = $volume
if (!exists $quotabloat{$user});
next;
}
if (/tree quota exceeded on volume (.*)/){
$treebloat{$1}++ if (! exists $treebloat{$1});
next;
}
push (@unknown,$_);
}
close(<LOG>);
print "\n==== Quota exceeded ====\n";
print wrap("","",join (" ",sort keys %quotabloat)),"\n";
print "\n==== Tree quota exceeded ====\n";
print wrap("","",join (" ",keys %treebloat)),"\n";
print "\n==== Unknown messages ====\n";
print @unknown;
-----------------
Hope this is helpful.
Respectfully,
David N. Blank-Edelman
Director of Technology
College of Computer Science
Northeastern University