[rancid] best way to remove part of a command's output

Burton Windle bwindle at fint.org
Thu Dec 11 21:21:08 UTC 2008


I've got a few Dell 6248 switches which, as part of the 'show system' 
command, display both their uptime and the temperature of the units. 
Both of these are problems, as they cause frequent hourly diffs to 
be emailed out.

I've removed the uptime, as that was all on one line with a unique prefix, 
but I'm unsure what the best way to remove the temperature. I'd really 
like to include the output of 'show system', as it has some data (fan 
status, mostly) I'd like to keep. I guess I could just remove any line 
with 'OK' in it, but I'd like to know more experienced rancid'ers 
would solve this.

Raw output is:




WH-ClientSW-1#show system
System Description: Dell Ethernet Switch
System Up Time (days, hour:min:sec): 4, 9:45:22
System Contact: 
System Name: WH-ClientSW-1
System Location: Warehouse Server room
Burned In MAC Address: 001E.C984.FAE6
System Object ID: 1.3.6.1.4.1.674.10875.3011
Machine Type: Dell 48 Port Gigabit Ethernet
Temperature Sensors:

Unit     Temperature (Celsius)    Status
----     ---------------------    ------
  1        35                      OK
  2        36                      OK
  3        36                      OK

Fans:

Unit     Description    Status
----     -----------    ------
  1       Fan 1          OK
  1       Fan 2          OK
  1       Fan 3          OK
  1       Fan 4          OK
  2       Fan 1          OK
  2       Fan 2          OK
  2       Fan 3          OK
  2       Fan 4          OK
  3       Fan 1          OK
  3       Fan 2          OK
  3       Fan 3          OK
  3       Fan 4          OK

Power Supplies:

Unit     Description    Status         Source
----     -----------    -----------    ------
  1       Main               OK             AC
  1       Secondary          Failure        DC
  2       Main               OK             AC
  2       Secondary          Failure        DC
  3       Main               OK             AC
  3       Secondary          Failure        DC



-- 
Burton Windle                           bwindle at fint.org



More information about the Rancid-discuss mailing list