[rancid] sorting output from custom commands...

Jon Peatfield J.S.Peatfield at damtp.cam.ac.uk
Tue Sep 28 17:06:30 UTC 2010


I added a quick hack to our rancid (2.3.4) setup to record the output of 
running:

   show cdp neighbors detail

to hrancid and rancid (we only have Cisco and HP procurve switches).

On the newer versions of the HP porocurve firmware (all 2610-xx models) 
each (cisco 79xx) phone device shows up as two device-ids, and it appears 
that every time a handset is connected those devices appear in a random 
order.

So at the moment we get spurious change messages swapping the order of the 
two entries (both on the same port).

I'm not very familiar with how ProcessHistory works, so I don't know if 
there is a trick I can use to get it to do the sorting for me.  I did 
already write a piece of code to store the data in a hash by device-id and 
only call ProcessHistory when we notice that the port in the output has 
changed, but I lost that by accidentally zapping the directory I was 
testing in (oops).  I can re-do that work easily enough but since other 
stuff has to handle output in different orders I wonder if I'm wasting my 
time...

  -- Jon

-- 
/--------------------------------------------------------------------\
| "Computers are different from telephones.  Computers do not ring." |
|       -- A. Tanenbaum, "Computer Networks", p. 32                  |
---------------------------------------------------------------------|
| Jon Peatfield, _Computer_ Officer, DAMTP,  University of Cambridge |
| Mail:  jp107 at damtp.cam.ac.uk     Web:  http://www.damtp.cam.ac.uk/ |
\--------------------------------------------------------------------/


More information about the Rancid-discuss mailing list