Skip to content

Conversation

@vincentchiang-ec
Copy link

Obtain the actual management port speed from system file /sys/class/net/eth0/speed.

- What I did
Currently the management port speed was obtained from the "speed" value in "MGMT_PORT" table of config_db. However, this field has no actual function.
This PR is to obtain the actual management port speed from system file "/sys/class/net/eth0/speed".

- How I did it
Add a function to obtain the actual management port speed from system file "/sys/class/net/eth0/speed".

- How to verify it
Run snmpwalk to get if high speed, make sure the management port speed is correct.

docker exec -it snmp snmpwalk -v2c -c public 127.0.0.1 1.3.6.1.2.1.31.1.1.1.15
iso.3.6.1.2.1.31.1.1.1.15.1 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.5 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.9 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.13 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.17 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.21 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.25 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.29 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.33 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.37 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.41 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.45 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.49 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.53 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.57 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.61 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.65 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.69 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.73 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.77 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.81 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.85 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.89 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.93 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.97 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.101 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.105 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.109 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.113 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.117 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.121 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.125 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.10000 = Gauge32: 1000

- Description for the changelog

Obtain the actual management port speed from system file /sys/class/net/eth0/speed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant