Update Metric Collector to Handle Incorrect Kernel File Values
Sometimes a port is recognized as existing but not properly configured which leads to kernel files not being correctly populated with correct values with respect to their properties. We should only consider a port to be Up/Active if the values match the spec and ignore any nonsense values. For example, negative speed does not make sense for a non active port.
Tested: Negative speed in /sys/class/net/speed file is ignored.
Change-Id: I0d6fb8c475e35c508a3e1166126b583a6bd3dcd7
Signed-off-by: Edward Lee <edwarddl@google.com>
1 file changed