[rancid] Re: Rancid Emailing Blank Diffs and Foundry
Jethro R Binks
jethro.binks at strath.ac.uk
Wed Dec 2 13:29:23 UTC 2009
On Tue, 1 Dec 2009, Steve O'Brien wrote:
> 2.) I have some foundry gear that gives me some bogus diffs in regards
> to fan speed changes, flash space, etc... How to have rancid ignore?
I can't remember how much is now in the distributed francid, but my
ShowChassis subroutine looks like this, to filter out some of that extra
crud. It is apparently based on francid.in,v 1.48.
sub ShowChassis {
my($skip) = 0;
print STDERR " In ShowChassis: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
last if (/^$prompt/);
next if (/ from /);
next if (/current temperature/i);
if (/^---/ || /^$/) { # next section reached
$skip = 0;
}
if (/(POWERS|TEMPERATURE READINGS)/) {
$skip = 1;
}
if (/fan controlled temperature:/i) {
$skip = 1;
}
if (/THERMAL PLANE/) {
$skip = 1;
}
if (/temperature:/i) {
$skip = 1;
}
s/(Fan \d+ \S+), speed .*/$1/;
if (/speed/i) {
$skip = 1;
}
next if $skip;
ProcessHistory("CHASSIS","","","! $_");
}
ProcessHistory("CHASSIS","","","!\n");
return(0);
}
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK
More information about the Rancid-discuss
mailing list