On Tue, 22 Jan 2019 11:42:34 +0100 Ingeborg Hellemo ingeborg.hellemo@uit.no wrote:
Example lines from the database:
nav=> select netboxid,ifindex,port,mac,start_time,end_time from cam where netboxid='5802'; netboxid | ifindex | port | mac | start_time | end_time ----------+---------+----------+-------------------+--------------------------- -+---------------------------- 5802 | 279 | | 6c:4b:90:1d:7d:a1 | 2019-01-18 10:13:00.577658 | infinity
We know that the device with MAC 6c:4b:90:1d:7d:a1 is connected to Gi3/0/15
nav=> select interfaceid,netboxid,moduleid,ifindex,ifname,ifdescr,iftype from interface where netboxid='5802' and interfaceid='2266190'; interfaceid | netboxid | moduleid | ifindex | ifname | ifdescr | iftype -------------+----------+----------+---------+----------+---------------------- -+-------- 2266190 | 5802 | | 279 | Gi3/0/15 | GigabitEthernet3/0/15 | 6
The box has no nameless interfaces.
I'm looking at the code, and the only immediate reason I can see how this could happen is if the cam collection ran before the interface had been collected by the inventory job (i.e. `cam.port` is set from `interface.ifname` or `interface.ifdescr`, if present, at the time the cam record is created, and is never updated after its creation).
It might also happen if the switch reindexed its interfaces between runs of the inventory and cam jobs (so that the cam records referred to ifindexes that inventory had not yet collected).
When was this WS-C93XX first entered into NAV, and did it reboot at any time near 2019-01-18 10:13:00?