<div dir="ltr"><div>Hi,</div><div><br></div><div>Need help in ignoring 'temperature and uptime' for this switch, but couldnt figure it out, found this page (<a href="https://www.bityard.org/blog/2015/10/01/dell_powerconnect_m-series_rancid">https://www.bityard.org/blog/2015/10/01/dell_powerconnect_m-series_rancid</a>) but it doesnt work. <br></div><div><br></div><div>Below is my srancid file (sh system portion), can anyone assist on how to ignore those 2 commands.</div><div><br></div><div><i><font size="1">sub ShowSys {<br>  Â  print STDERR " Â  Â In ShowSys: $_" if ($debug);<br>  Â  $_ =~ s/^[^#]*//;<br>  Â  ProcessHistory("COMMENTS","keysort","C1","!\n! $_");<br><br>  Â  while (<INPUT>) {<br>  Â  Â  Â  s/^\s+\015//g;<br>  Â  Â  Â  tr/\015//d;<br>  Â  Â  Â  next if /^\s*$/;<br>  Â  Â  Â  last if(/$prompt/);<br>  Â  Â  Â  # pager remnants like: ^H^H^H Â  Â ^H^H^H content<br>  Â  Â  Â  s/[\b]+\s*[\b]*//g;<br><br>  Â  Â  Â  # Remove Uptime<br>  Â  Â  Â  / up time/i && next;<br><br>  Â  Â  Â  # filter temperature sensor info for Dell 6428 stacks, Powerconnect 7048<br>  Â  Â  Â  # /Temperature Sensors:/<br>  Â  Â  Â  if (/Temperature \(Celsius\)/) {<br>  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1","! $_");<br>  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1","! Unit\tStatus\n");<br>  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1","! ----\t------\n");<br>  Â  Â  Â  Â  Â  while (<INPUT>) {<br>  Â  Â  Â  Â  Â  Â  Â  s/^\s+\015//g;<br>  Â  Â  Â  Â  Â  Â  Â  tr/\015//d;<br>  Â  Â  Â  Â  Â  Â  Â  goto ENDSHOWSYS if(/$prompt/);<br>  Â  Â  Â  Â  Â  Â  Â  /(\d+)\s+\d+\s+(.*)$/ &&<br>  Â  Â  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1","! $1\t$2\n");<br>  Â  Â  Â  Â  Â  Â  Â  /^\s*$/ && last;<br>  Â  Â  Â  Â  Â  }<br>  Â  Â  Â  } elsif (/Temperature/) {<br>  Â  Â  Â  Â  Â  # Filter temperature sensor info for Dell M6348 and M8024 blade<br>  Â  Â  Â  Â  Â  # switches.<br>  Â  Â  Â  Â  Â  #<br>  Â  Â  Â  Â  Â  # M6348 and M8024 sample lines:<br>  Â  Â  Â  Â  Â  # Â  Unit Â  Â  Description Â  Â  Â  Temperature Â  Â Status<br>  Â  Â  Â  Â  Â  # Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  (Celsius)<br>  Â  Â  Â  Â  Â  # Â  ---- Â  Â  ----------- Â  Â  Â  ----------- Â  Â ------<br>  Â  Â  Â  Â  Â  # Â  1 Â  Â  Â  Â System Â  Â  Â  Â  Â  Â 39 Â  Â  Â  Â  Â  Â  Good<br>  Â  Â  Â  Â  Â  # Â  2 Â  Â  Â  Â System Â  Â  Â  Â  Â  Â 39 Â  Â  Â  Â  Â  Â  Good<br>  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1",<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â "! Unit\tDescription\tStatus\n");<br>  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1",<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â "! ----\t-----------\t------\n");<br>  Â  Â  Â  Â  Â  while (<INPUT>) {<br>  Â  Â  Â  Â  Â  Â  Â  /\(celsius\)/i && next;<br>  Â  Â  Â  Â  Â  Â  Â  s/^\s+\015//g;<br>  Â  Â  Â  Â  Â  Â  Â  tr/\015//d;<br>  Â  Â  Â  Â  Â  Â  Â  goto ENDSHOWSYS if(/$prompt/);<br>  Â  Â  Â  Â  Â  Â  Â  /(\d+)\s+(\w+)\s+\d+\s+(.*)$/ &&<br>  Â  Â  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1","! $1\t$2\t\t$3\n");<br>  Â  Â  Â  Â  Â  Â  Â  /^\s*$/ && last;<br>  Â  Â  Â  Â  Â  }<br>  Â  Â  Â  }<br><br>  Â  Â  Â  # filter power rates and tmestamps from 7024 power supply info<br>  Â  Â  Â  # Power Supplies:<br>  Â  Â  Â  # Â <br>  Â  Â  Â  # Unit Â Description Â  Â Status Â  Â  Average Â  Â  Current Â  Â  Â  Â  Â Since<br>  Â  Â  Â  # Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Power Â  Â  Â  Power Â  Â  Â  Â  Date/Time<br>  Â  Â  Â  # Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  (Watts) Â  Â  (Watts)<br>  Â  Â  Â  # ---- Â ----------- Â ----------- Â ---------- Â -------- Â -------------------<br>  Â  Â  Â  # 1 Â  Â  System Â  Â  Â  OK Â  Â  Â  Â  Â  Â 1.4 Â  Â  Â  Â 65.2<br>  Â  Â  Â  # 1 Â  Â  Internal Â  Â  OK Â  Â  Â  Â  Â  N/A Â  Â  Â  Â  N/A Â  Â  Â  10/05/2017 20:18:35<br>  Â  Â  Â  if (/power supplies/i) {<br>  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1", "!\n");<br>  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1",<br>  Â  Â  Â  Â  Â  Â  Â  "! Unit\tDescription\tStatus\n");<br>  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1",<br>  Â  Â  Â  Â  Â  Â  Â  "! ----\t-----------\t------\n");<br>  Â  Â  Â  Â  Â  while (<INPUT>) {<br>  Â  Â  Â  Â  Â  Â  Â  s/^\s+\015//g;<br>  Â  Â  Â  Â  Â  Â  Â  tr/\015//d;<br>  Â  Â  Â  Â  Â  Â  Â  goto ENDSHOWSYS if(/$prompt/);<br>  Â  Â  Â  Â  Â  Â  Â  /^(unit\s|--+\s|\s)/i && next;<br>  Â  Â  Â  Â  Â  Â  Â  if (/(\d+)\s+(\w+)\s+(\w+(\s\w+)?)\s/) {<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  if (length($2) >= 8) {<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1","! $1\t$2\t$3\n");<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  } else {<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1","! $1\t$2\t\t$3\n");<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  }<br>  Â  Â  Â  Â  Â  Â  Â  }<br>  Â  Â  Â  Â  Â  Â  Â  /^\s*$/ && last;<br>  Â  Â  Â  Â  Â  }<br>  Â  Â  Â  }<br><br>  Â  Â  Â  /system description: (.*)/i &&<br>  Â  Â  Â  Â  Â  ProcessHistory("COMMENTS","keysort","A1", "!Chassis type: $1\n") &&<br>  Â  Â  Â  Â  Â  next;<br><br>  Â  Â  Â  ProcessHistory("COMMENTS","keysort","C1","! $_");<br>  Â  }<br>ENDSHOWSYS:<br>  Â  return(0);<br>}</font></i></div><div><br></div><div>Thanks<br></div></div>