From 6d32d74a1684b9a7f94fbd395ca8fcd9d001feb0 Mon Sep 17 00:00:00 2001 From: keboliu Date: Fri, 18 May 2018 13:03:10 +0300 Subject: [PATCH 01/14] add transceiver monitoring hld design --- doc/transceiver-monitor-hld.md | 105 +++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 doc/transceiver-monitor-hld.md diff --git a/doc/transceiver-monitor-hld.md b/doc/transceiver-monitor-hld.md new file mode 100644 index 0000000000..81d30834f1 --- /dev/null +++ b/doc/transceiver-monitor-hld.md @@ -0,0 +1,105 @@ +# Transceiver and Sensor Monitoring HLD # + +### Rev 0.1 ### + +### Revision + | Rev | Date | Author | Change Description | + |:---:|:-----------:|:------------------:|-----------------------------------| + | 0.1 | | Liu Kebo | Initial version | + +## About This Manual ## + +This document is intend to provide general information about the Transceiver and Sensor Monitoring implementation. +The requirement is described in [Sensor and Transceiver Info Monitoring Requirement.](https://github.com/Azure/SONiC/blob/gh-pages/doc/OIDsforSensorandTransciver.MD) + +## 1. Xcvrd design ## + +New Xcvrd in platform monitor container need to periodically fetch the transceiver and DOM sensor information from the eeprom. For now the time period temporarily set to 5s, need to be adjusted according the later test. + +If there is transceiver and sensor status change, Xcvrd will write the new status to state DB, to store these information a new transceiver table will be added. + +### 1.1 State DB Schema ### + +New Transceiver table will be added to state DB to store the transceiver and DOM sensor information. + +#### 1.1.1 Transceiver Table #### + + ; Defines Transceiver and DOM sensor information for a port + key = TRANSCEIVER_TABLE|ifname ; configuration for watchdog on port + ; field = value + type = 1*255VCHAR ; type of sfp + hardwarerev = 1*255VCHAR ; hardware version of sfp + serialnum = 1*255VCHAR ; serial number of the sfp + manufacturename = 1*255VCHAR ; sfp venndor name + modelname = 1*255VCHAR ; sfp model name + temperature = FLOAT ; temperature value in Celsius + voltage = FLOAT ; voltage value + rx1power = FLOAT ; rx1 power in dbm + rx2power = FLOAT ; rx2 power in dbm + rx3power = FLOAT ; rx3 power in dbm + rx4power = FLOAT ; rx4 power in dbm + tx1bias = FLOAT ; tx1 bias in mA + tx2bias = FLOAT ; tx2 bias in mA + tx3bias = FLOAT ; tx3 bias in mA + tx4bias = FLOAT ; tx4 bias in mA + +### 1.2 Local cache for Transceiver info### + +Xcvrd will maintain a local cache for the Transceiver and DOM status, after fetched the latest status, will compare to the local cache. TRANSCEIVER_TABLE will only be updates when there is status change + +### 1.3 Xcvrd daemon flow ### + +Xcvrd retrieve transceiver and DOM sensor information periodically via the sfputil. + +If the value of some field changed compare to local cache, local cache will be updated and Xcvrd will update the TRANSCEIVER_TABLE. + +![](https://github.com/Azure/SONiC/blob/gh-pages/images/transceiver_monitoring_hld/xcvrd_flow.svg) + + + +## 2. SNMP Agent Change ## + +### 2.1 MIB tables extension ### + +MIB table entPhysicalTable from [Entity MIB(RFC2737)](https://tools.ietf.org/html/rfc2737) need to be extended to support new OIDs. + +| OID | SNMP counter | Where to get the info in Sonic. | Example: | +| --- | --- | --- | --- | +| 1.3.6.1.2.1.47.1.1.1 | entPhysicalTable | | | +| 1.3.6.1.2.1.47.1.1.1.1 | entPhysicalEntry | | | +| 1.3.6.1.2.1.47.1.1.1.1.2. ifindex | entPhysicalDescr | Show interfaces alias | Xcvr for Ethernet29 | +| 1.3.6.1.2.1.47.1.1.1.1.7. ifindex | entPhysicalName | skipped | | +| 1.3.6.1.2.1.47.1.1.1.1.8. ifindex | entPhysicalHardwareVersion | Vendor Rev in CLI or sfputil | A1 | +| 1.3.6.1.2.1.47.1.1.1.1.9. ifindex | entPhysicalFirmwareVersion | Skipped | | +| 1.3.6.1.2.1.47.1.1.1.1.10.ifindex | entPhysicalSoftwareRevision | Skipped | | +| 1.3.6.1.2.1.47.1.1.1.1.11.ifindex | entPhysicalSerialNum | Vendor SN in CLI or sfputil | WW5062F | +| 1.3.6.1.2.1.47.1.1.1.1.12.ifindex | entPhysicalMfgName | Vendor Name in CLI or sfputil | FINISAR CORP | +| 1.3.6.1.2.1.47.1.1.1.1.13.ifindex | entPhysicalModelName | Vendor PN in CLI or sfputil| FCBN410QD3C02 | + + +Another entPhySensorTable which is defined in [Entity Sensor MIB(RFC3433)](https://tools.ietf.org/html/rfc3433) need to be new added. + +| OID | SNMP counter | Where to get the info in Sonic. | Example: | +| --- | --- | --- | --- | +| 1.3.6.1.2.1.99.1.1 | entPhySensorTable | | | +| 1.3.6.1.2.1.99.1.1.1 | entPhySensorEntry | | | +| 1.3.6.1.2.1.99.1.1.1.1.index | entPhySensorType | In CLI: E.g.RX1Power: -0.97dBm | 6 | +| 1.3.6.1.2.1.99.1.1.1.2.index | entPhySensorScale | Same as above | 8 | +| 1.3.6.1.2.1.99.1.1.1.3.index | entPhySensorPrecision | Same as above | 4 | +| 1.3.6.1.2.1.99.1.1.1.4.index | entPhySensorValue | Same as above | 7998 | +| 1.3.6.1.2.1.47.1.1.1.1.2.index | entPhysicalDescr | Show interfaces alias | DOM RX Power Sensor for DOM RX Power Sensor for Ethernet29/1 | + + +More detailed information about new table and new OIDs are described in [Sensor and Transceiver Info Monitoring Requirement](https://github.com/Azure/SONiC/blob/gh-pages/doc/OIDsforSensorandTransciver.MD#transceiver-requirements-entity-mib). + +### 2.2 New connection to STATE_DB ### + +To get the transceiver and dom sensor status, SNMP agent need to connect to STATE\_DB and fetch information from TRNASCEIVER_TABLE which will be updated by Xcvrd when this is status change. + + +## 3. Open Questions ## + +1. split the TRANSCEIVER_TABLE to 2 tables, one is for transceiver which store the information needed by entPhysicalTable and another is for entPhySensorTable ? + + + \ No newline at end of file From a31f352ab5f93bec2adc0cb16ca4ac6e4a919f81 Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Fri, 18 May 2018 18:10:02 +0800 Subject: [PATCH 02/14] Update transceiver-monitor-hld.md --- doc/transceiver-monitor-hld.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/transceiver-monitor-hld.md b/doc/transceiver-monitor-hld.md index 81d30834f1..fe54ba1d9a 100644 --- a/doc/transceiver-monitor-hld.md +++ b/doc/transceiver-monitor-hld.md @@ -43,7 +43,7 @@ New Transceiver table will be added to state DB to store the transceiver and DOM tx3bias = FLOAT ; tx3 bias in mA tx4bias = FLOAT ; tx4 bias in mA -### 1.2 Local cache for Transceiver info### +### 1.2 Local cache for Transceiver info ### Xcvrd will maintain a local cache for the Transceiver and DOM status, after fetched the latest status, will compare to the local cache. TRANSCEIVER_TABLE will only be updates when there is status change @@ -102,4 +102,4 @@ To get the transceiver and dom sensor status, SNMP agent need to connect to STAT 1. split the TRANSCEIVER_TABLE to 2 tables, one is for transceiver which store the information needed by entPhysicalTable and another is for entPhySensorTable ? - \ No newline at end of file + From 13d422d58706cce92f8d31f2009fdd4ba2889386 Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Mon, 21 May 2018 11:31:15 +0800 Subject: [PATCH 03/14] Update transceiver-monitor-hld.md --- doc/transceiver-monitor-hld.md | 36 ++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/doc/transceiver-monitor-hld.md b/doc/transceiver-monitor-hld.md index fe54ba1d9a..a2cd59ddfd 100644 --- a/doc/transceiver-monitor-hld.md +++ b/doc/transceiver-monitor-hld.md @@ -20,28 +20,34 @@ If there is transceiver and sensor status change, Xcvrd will write the new statu ### 1.1 State DB Schema ### -New Transceiver table will be added to state DB to store the transceiver and DOM sensor information. +New Transceiver info table and transceiver DOM sensor table will be added to state DB to store the transceiver and DOM sensor information. -#### 1.1.1 Transceiver Table #### +#### 1.1.1 Transceiver info Table #### - ; Defines Transceiver and DOM sensor information for a port - key = TRANSCEIVER_TABLE|ifname ; configuration for watchdog on port + ; Defines Transceiver information for a port + key = TRANSCEIVER_INFO_TABLE|ifname ; configuration for watchdog on port ; field = value type = 1*255VCHAR ; type of sfp hardwarerev = 1*255VCHAR ; hardware version of sfp serialnum = 1*255VCHAR ; serial number of the sfp manufacturename = 1*255VCHAR ; sfp venndor name modelname = 1*255VCHAR ; sfp model name - temperature = FLOAT ; temperature value in Celsius - voltage = FLOAT ; voltage value - rx1power = FLOAT ; rx1 power in dbm - rx2power = FLOAT ; rx2 power in dbm - rx3power = FLOAT ; rx3 power in dbm - rx4power = FLOAT ; rx4 power in dbm - tx1bias = FLOAT ; tx1 bias in mA - tx2bias = FLOAT ; tx2 bias in mA - tx3bias = FLOAT ; tx3 bias in mA - tx4bias = FLOAT ; tx4 bias in mA + +#### 1.1.2 Transceiver DOM sensor Table #### + + ; Defines Transceiver DOM sensor information for a port + key = TRANSCEIVER_DOM_SENSOR_TABLE|ifname ; configuration for watchdog on port + temperature = FLOAT ; temperature value in Celsius + voltage = FLOAT ; voltage value + rx1power = FLOAT ; rx1 power in dbm + rx2power = FLOAT ; rx2 power in dbm + rx3power = FLOAT ; rx3 power in dbm + rx4power = FLOAT ; rx4 power in dbm + tx1bias = FLOAT ; tx1 bias in mA + tx2bias = FLOAT ; tx2 bias in mA + tx3bias = FLOAT ; tx3 bias in mA + tx4bias = FLOAT ; tx4 bias in mA + ### 1.2 Local cache for Transceiver info ### @@ -99,7 +105,7 @@ To get the transceiver and dom sensor status, SNMP agent need to connect to STAT ## 3. Open Questions ## -1. split the TRANSCEIVER_TABLE to 2 tables, one is for transceiver which store the information needed by entPhysicalTable and another is for entPhySensorTable ? +1. performance concern on fetch all sensor information, need test; may need to use SX_TRAP_ID_PMPE event in the future to trigger the transceiver information update instead of using polling, but how about the DOM sensor? From 97d7bed20e973d9d481d782fe8237632126fbc9d Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Mon, 21 May 2018 15:51:15 +0800 Subject: [PATCH 04/14] Update transceiver-monitor-hld.md --- doc/transceiver-monitor-hld.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/transceiver-monitor-hld.md b/doc/transceiver-monitor-hld.md index a2cd59ddfd..de6658d4d8 100644 --- a/doc/transceiver-monitor-hld.md +++ b/doc/transceiver-monitor-hld.md @@ -16,7 +16,7 @@ The requirement is described in [Sensor and Transceiver Info Monitoring Requirem New Xcvrd in platform monitor container need to periodically fetch the transceiver and DOM sensor information from the eeprom. For now the time period temporarily set to 5s, need to be adjusted according the later test. -If there is transceiver and sensor status change, Xcvrd will write the new status to state DB, to store these information a new transceiver table will be added. +If there is transceiver and sensor status change, Xcvrd will write the new status to state DB, to store these information somes new tables will be added to STATE_DB. ### 1.1 State DB Schema ### From 3a60b6508a90c339d294899c118d5e788dae3814 Mon Sep 17 00:00:00 2001 From: keboliu Date: Fri, 1 Jun 2018 13:58:40 +0300 Subject: [PATCH 05/14] add flow chart --- images/xcvrd_flow.svg | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 images/xcvrd_flow.svg diff --git a/images/xcvrd_flow.svg b/images/xcvrd_flow.svg new file mode 100644 index 0000000000..5604d62272 --- /dev/null +++ b/images/xcvrd_flow.svg @@ -0,0 +1,2 @@ + +
Xcvrd
Xcvrd
Subscribe to SFP plug in/out notification
Subscribe to SFP plug in/out notification
Start DOM sensor refresh timer
Start DOM sensor refresh timer
sfputil
sfputil
sfp driver
sfp driver
State DB
State DB
get sfp info
get sfp info
return
return
read eeprom info
read eeprom info
return
return
loop
loop
alt
alt
get SFP and  dom info at init
get SFP and  dom info at init
return
return
read eeprom info
read eeprom info
return
return
alt
[Not supported by viewer]
update DB with sfp info
update DB with sfp info
get sfp plug in/out notification
get sfp plug in/out notification
update DB
update DB
get dom info
get dom info
return
return
read eeprom info
read eeprom info
return
return
update DB with dom info
update DB with dom info
dom sensor refresh time out
dom sensor refresh time out
\ No newline at end of file From 71de3e594aa1b41c429788fa53d73a147e743dc1 Mon Sep 17 00:00:00 2001 From: keboliu Date: Fri, 1 Jun 2018 14:02:02 +0300 Subject: [PATCH 06/14] Revert "add flow chart" This reverts commit 3a60b6508a90c339d294899c118d5e788dae3814. --- images/xcvrd_flow.svg | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 images/xcvrd_flow.svg diff --git a/images/xcvrd_flow.svg b/images/xcvrd_flow.svg deleted file mode 100644 index 5604d62272..0000000000 --- a/images/xcvrd_flow.svg +++ /dev/null @@ -1,2 +0,0 @@ - -
Xcvrd
Xcvrd
Subscribe to SFP plug in/out notification
Subscribe to SFP plug in/out notification
Start DOM sensor refresh timer
Start DOM sensor refresh timer
sfputil
sfputil
sfp driver
sfp driver
State DB
State DB
get sfp info
get sfp info
return
return
read eeprom info
read eeprom info
return
return
loop
loop
alt
alt
get SFP and  dom info at init
get SFP and  dom info at init
return
return
read eeprom info
read eeprom info
return
return
alt
[Not supported by viewer]
update DB with sfp info
update DB with sfp info
get sfp plug in/out notification
get sfp plug in/out notification
update DB
update DB
get dom info
get dom info
return
return
read eeprom info
read eeprom info
return
return
update DB with dom info
update DB with dom info
dom sensor refresh time out
dom sensor refresh time out
\ No newline at end of file From f55fd2818ca6a64ff533e97ff711b3810319952e Mon Sep 17 00:00:00 2001 From: keboliu Date: Fri, 1 Jun 2018 14:07:31 +0300 Subject: [PATCH 07/14] add flow chart --- images/transceiver_monitoring_hld/xcvrd_flow.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/transceiver_monitoring_hld/xcvrd_flow.svg b/images/transceiver_monitoring_hld/xcvrd_flow.svg index a2c5c85331..5604d62272 100644 --- a/images/transceiver_monitoring_hld/xcvrd_flow.svg +++ b/images/transceiver_monitoring_hld/xcvrd_flow.svg @@ -1,2 +1,2 @@ -
Xcvrd
Xcvrd
load_platform_sfputil
load_platform_sfputil
compare with local  cache
compare with local  cache<br>
sfputil
sfputil
sfp driver
sfp driver
State DB
State DB
if sensor info changed 
if sensor info changed 
get sfp and dom info
get sfp and dom info
return
return
read eeprom info
read eeprom info
return
return
update DB 
update DB 
loop
loop
alt
alt
update local cache
update local cache
\ No newline at end of file +
Xcvrd
Xcvrd
Subscribe to SFP plug in/out notification
Subscribe to SFP plug in/out notification
Start DOM sensor refresh timer
Start DOM sensor refresh timer
sfputil
sfputil
sfp driver
sfp driver
State DB
State DB
get sfp info
get sfp info
return
return
read eeprom info
read eeprom info
return
return
loop
loop
alt
alt
get SFP and  dom info at init
get SFP and  dom info at init
return
return
read eeprom info
read eeprom info
return
return
alt
[Not supported by viewer]
update DB with sfp info
update DB with sfp info
get sfp plug in/out notification
get sfp plug in/out notification
update DB
update DB
get dom info
get dom info
return
return
read eeprom info
read eeprom info
return
return
update DB with dom info
update DB with dom info
dom sensor refresh time out
dom sensor refresh time out
\ No newline at end of file From 77da04dbac0266a06214ad5dee0dcbbe697465fc Mon Sep 17 00:00:00 2001 From: keboliu Date: Fri, 1 Jun 2018 14:10:34 +0300 Subject: [PATCH 08/14] add hld design --- doc/transceiver-monitor-hld.md | 55 ++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/doc/transceiver-monitor-hld.md b/doc/transceiver-monitor-hld.md index de6658d4d8..19b79a89d8 100644 --- a/doc/transceiver-monitor-hld.md +++ b/doc/transceiver-monitor-hld.md @@ -12,11 +12,16 @@ This document is intend to provide general information about the Transceiver and Sensor Monitoring implementation. The requirement is described in [Sensor and Transceiver Info Monitoring Requirement.](https://github.com/Azure/SONiC/blob/gh-pages/doc/OIDsforSensorandTransciver.MD) + ## 1. Xcvrd design ## -New Xcvrd in platform monitor container need to periodically fetch the transceiver and DOM sensor information from the eeprom. For now the time period temporarily set to 5s, need to be adjusted according the later test. +New Xcvrd in platform monitor container is designed to fetch the transceiver and DOM sensor information from the eeprom and then update the state db with these info. + +For the transceiver it's self, the type, serial number, hardware version, etc. will not change after plug in. The suitable way for transceiver information update can be triggered by transceiver plug in/out event. + +The transceiver dom sensor information(temperature, power,voltage, etc.) can change frequently, these information need to be updated periodically, for now the time period temporarily set to 120s(see open question 1), this time period need to be adjusted according the later on test on all vendors platform. -If there is transceiver and sensor status change, Xcvrd will write the new status to state DB, to store these information somes new tables will be added to STATE_DB. +If there is transceiver and sensor status change, Xcvrd will write the new status to state DB, to store these information some new tables will be added to STATE_DB. ### 1.1 State DB Schema ### @@ -25,7 +30,7 @@ New Transceiver info table and transceiver DOM sensor table will be added to sta #### 1.1.1 Transceiver info Table #### ; Defines Transceiver information for a port - key = TRANSCEIVER_INFO_TABLE|ifname ; configuration for watchdog on port + key = TRANSCEIVER_INFO|ifname ; configuration for watchdog on port ; field = value type = 1*255VCHAR ; type of sfp hardwarerev = 1*255VCHAR ; hardware version of sfp @@ -36,7 +41,7 @@ New Transceiver info table and transceiver DOM sensor table will be added to sta #### 1.1.2 Transceiver DOM sensor Table #### ; Defines Transceiver DOM sensor information for a port - key = TRANSCEIVER_DOM_SENSOR_TABLE|ifname ; configuration for watchdog on port + key = TRANSCEIVER_DOM_SENSOR|ifname ; configuration for watchdog on port temperature = FLOAT ; temperature value in Celsius voltage = FLOAT ; voltage value rx1power = FLOAT ; rx1 power in dbm @@ -49,19 +54,44 @@ New Transceiver info table and transceiver DOM sensor table will be added to sta tx4bias = FLOAT ; tx4 bias in mA -### 1.2 Local cache for Transceiver info ### +### 1.2 Access eeprom from platform container ### + +Transceiver information eeprom can be accessed via read files(e.g. /sys/bus/i2c/devices/2-0048/hwmon/hwmon4/qsfp9_eeprom), different vendors may have these files under different folders, these folder need to be mounted to platform container so Xcvrd can access them. + +Another potential enhancement to the eeprom reading is to only read the needed parameters out instead of read all of them, this can be achieved by add new API to `SfpUtilBase` which can read desired bytes starting from give offset and parse the bytes to readable format accordingly. + +For the convenience of implementation and reduce the time consuming, need to enhance the `SfpUtilBase` class to provide functions to get `eeprom_if_dict` and `eeprom_dom_dict` separately, the intrested values are defined in section 1.1.1 and 1.1.2, we can pick up these values from eeprom by calling the above new API with proper offset and number of bytes. -Xcvrd will maintain a local cache for the Transceiver and DOM status, after fetched the latest status, will compare to the local cache. TRANSCEIVER_TABLE will only be updates when there is status change -### 1.3 Xcvrd daemon flow ### +### 1.3 Transceiver plug in/out event ### -Xcvrd retrieve transceiver and DOM sensor information periodically via the sfputil. +Xcvrd need to be triggered by transceiver plug in/out event to refresh the transceiver info table. -If the value of some field changed compare to local cache, local cache will be updated and Xcvrd will update the TRANSCEIVER_TABLE. +Transceiver plug in/out status can be derived from the content of sysfs file like `"/sys/bus/i2c/devices/2-0048/hwmon/hwmon7/qsfp10_status"`, if the content of the file is "good" represent SFP is present, conent change to "not_connected" means SFP plug out. -![](https://github.com/Azure/SONiC/blob/gh-pages/images/transceiver_monitoring_hld/xcvrd_flow.svg) +To monitor the file change, can introduce python lib [inotify](https://pypi.org/project/inotify/), which can raise notification when target file change. Below is a sample for how to use inotify lib to monitor file change: + i = inotify.adapters.Inotify() + i.add_watch(b'/bsp/qsfp/qsfp10_status') + + try: + for event in i.event_gen(): + if event is not None: + (header, type_names, watch_path, filename) = event + _LOGGER.info("WD=(%d) MASK=(%d) COOKIE=(%d) LEN=(%d) MASK->NAMES=%s " + "WATCH-PATH=[%s] FILENAME=[%s]", + header.wd, header.mask, header.cookie, header.len, type_names, + watch_path.decode('utf-8'), filename.decode('utf-8')) + finally: + i.remove_watch(b'/tmp') + + +### 1.4 Xcvrd daemon flow ### + +Xcvrd retrieve transceiver by event trigger, DOM sensor information will be periodically freshed, these infomation can be readed via sfputil. + +![](https://github.com/keboliu/SONiC/blob/xcvrd-hld/images/transceiver_monitoring_hld/xcvrd_flow.svg) ## 2. SNMP Agent Change ## @@ -105,7 +135,6 @@ To get the transceiver and dom sensor status, SNMP agent need to connect to STAT ## 3. Open Questions ## -1. performance concern on fetch all sensor information, need test; may need to use SX_TRAP_ID_PMPE event in the future to trigger the transceiver information update instead of using polling, but how about the DOM sensor? - +1. DOM sensor polling period need to be finialized after collecting enough data on various platform and later on test based on the new eerpom reading API. - + From dca0f27153b61a6e594b1aac2c25c9fe38ecfd1a Mon Sep 17 00:00:00 2001 From: keboliu Date: Fri, 8 Jun 2018 13:10:26 +0300 Subject: [PATCH 09/14] update hld with comments fix --- doc/transceiver-monitor-hld.md | 61 ++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/doc/transceiver-monitor-hld.md b/doc/transceiver-monitor-hld.md index 19b79a89d8..dc56e774a0 100644 --- a/doc/transceiver-monitor-hld.md +++ b/doc/transceiver-monitor-hld.md @@ -58,34 +58,53 @@ New Transceiver info table and transceiver DOM sensor table will be added to sta Transceiver information eeprom can be accessed via read files(e.g. /sys/bus/i2c/devices/2-0048/hwmon/hwmon4/qsfp9_eeprom), different vendors may have these files under different folders, these folder need to be mounted to platform container so Xcvrd can access them. -Another potential enhancement to the eeprom reading is to only read the needed parameters out instead of read all of them, this can be achieved by add new API to `SfpUtilBase` which can read desired bytes starting from give offset and parse the bytes to readable format accordingly. -For the convenience of implementation and reduce the time consuming, need to enhance the `SfpUtilBase` class to provide functions to get `eeprom_if_dict` and `eeprom_dom_dict` separately, the intrested values are defined in section 1.1.1 and 1.1.2, we can pick up these values from eeprom by calling the above new API with proper offset and number of bytes. +For the convenience of implementation and reduce the time consuming, need to do enhancement to the `SfpUtilBase` class: +1. `SfpUtilBase` internally should add the ability to read the eeprom and only pick up the interested bytes by given offset and bumber of bytes. -### 1.3 Transceiver plug in/out event ### - -Xcvrd need to be triggered by transceiver plug in/out event to refresh the transceiver info table. - -Transceiver plug in/out status can be derived from the content of sysfs file like `"/sys/bus/i2c/devices/2-0048/hwmon/hwmon7/qsfp10_status"`, if the content of the file is "good" represent SFP is present, conent change to "not_connected" means SFP plug out. +2. `SfpUtilBase` will provide APIs `get_eeprom_sfp_info_dict(self, port_num)` and `get_eeprom_dom_info_dict(self, port_num)` to return `eeprom_if_dict` and `eeprom_dom_dict` separately, the interested values of these two dict are defined in section 1.1.1 and 1.1.2. In these two APIs can pick up these values from eeprom by provide the corresponding offset and number of bytes. -To monitor the file change, can introduce python lib [inotify](https://pypi.org/project/inotify/), which can raise notification when target file change. Below is a sample for how to use inotify lib to monitor file change: - i = inotify.adapters.Inotify() - - i.add_watch(b'/bsp/qsfp/qsfp10_status') +### 1.3 Transceiver plug in/out event ### - try: - for event in i.event_gen(): - if event is not None: - (header, type_names, watch_path, filename) = event - _LOGGER.info("WD=(%d) MASK=(%d) COOKIE=(%d) LEN=(%d) MASK->NAMES=%s " - "WATCH-PATH=[%s] FILENAME=[%s]", - header.wd, header.mask, header.cookie, header.len, type_names, - watch_path.decode('utf-8'), filename.decode('utf-8')) - finally: - i.remove_watch(b'/tmp') +Xcvrd need to be triggered by transceiver plug in/out event to refresh the transceiver info table. +Transceiver plug in/out status can be derived from the content of sysfs file like `"/sys/bus/i2c/devices/2-0048/hwmon/hwmon7/qsfp10_status"`. + +To get this sfp status file path for a certain port, each vendor need to implement a new API `get_sfp_status_file_path(self, port_num)` in the SFP plugin(class SfpUtil). + +Python lib [inotify](https://pypi.org/project/inotify/), is a good tool to monitor the file change and raise notification. + +Below is a sample for how to use inotify lib to monitor file change: + + import os + import inotify + import time + import inotify.adapters + + def _main(): + i = inotify.adapters.Inotify() + i.add_watch(b'/sys/bus/i2c/devices/2-0048/hwmon/hwmon6/qsfp10_status') + try: + while True: + events = i.event_gen(timeout_s=1) + for event in events: + if event is not None: + (header, type_names, watch_path, filename) = event + print "MASK->NAMES=%s WATCH-PATH=[%s] FILENAME=[%s]" % (type_names, watch_path.decode('utf-8'),filename.decode('utf-8')) + print("no event found") + time.sleep(10) + + finally: + i.remove_watch(b'/sys/bus/i2c/devices/2-0048/hwmon/hwmon6/qsfp10_status') + + if __name__ == '__main__': + _main() + +Xcvrd will pass all the sfp status files to inotify and monitor them for the change. + +When a sfp status file change notification received by Xcvrd, by calling current SFP plugin API `get_presence(self, port_num)` it can get the SFP present status. ### 1.4 Xcvrd daemon flow ### From 411f16824f66b0aa8a6632cdb43f67d0713374e3 Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Tue, 26 Jun 2018 23:04:14 +0800 Subject: [PATCH 10/14] Add files via upload --- images/transceiver_monitoring_hld/xcvrd_flow.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/transceiver_monitoring_hld/xcvrd_flow.svg b/images/transceiver_monitoring_hld/xcvrd_flow.svg index 5604d62272..7315df0af1 100644 --- a/images/transceiver_monitoring_hld/xcvrd_flow.svg +++ b/images/transceiver_monitoring_hld/xcvrd_flow.svg @@ -1,2 +1,2 @@ -
Xcvrd
Xcvrd
Subscribe to SFP plug in/out notification
Subscribe to SFP plug in/out notification
Start DOM sensor refresh timer
Start DOM sensor refresh timer
sfputil
sfputil
sfp driver
sfp driver
State DB
State DB
get sfp info
get sfp info
return
return
read eeprom info
read eeprom info
return
return
loop
loop
alt
alt
get SFP and  dom info at init
get SFP and  dom info at init
return
return
read eeprom info
read eeprom info
return
return
alt
[Not supported by viewer]
update DB with sfp info
update DB with sfp info
get sfp plug in/out notification
get sfp plug in/out notification
update DB
update DB
get dom info
get dom info
return
return
read eeprom info
read eeprom info
return
return
update DB with dom info
update DB with dom info
dom sensor refresh time out
dom sensor refresh time out
\ No newline at end of file +
Xcvrd
Xcvrd
wait for all the port configured
wait for all the port configured
new thread
new thread
sfputil
sfputil
alt
alt
sfp driver
sfp driver
State DB
State DB
plug in
plug in
get sfp and dom info
get sfp and dom info
return
return
read eeprom info
read eeprom info
return
return
loop
loop
alt
alt
get SFP and  dom info at init
get SFP and  dom info at init
return
return
read eeprom info
read eeprom info
return
return
alt
[Not supported by viewer]
update DB
update DB
get dom info
get dom info
return
return
read eeprom info
read eeprom info
return
return
update DB with dom info
update DB with dom info
dom sensor refresh time out
dom sensor refresh time out
SFP status monitoring thread
SFP status monitoring thread
get event
get event
update DB with sfp and dom info
update DB with sfp and dom info
alt
alt
plug out
plug out
delete sfp and dom info from DB
delete sfp and dom info from DB
Timer handler thread
Timer handler thread
new thread
new thread
loop
loop
\ No newline at end of file From c6302fd85dbc7db55b42655cea2f4a38d4c3224d Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Tue, 26 Jun 2018 23:06:03 +0800 Subject: [PATCH 11/14] Add files via upload --- doc/transceiver-monitor-hld.md | 60 +++++++++++++++------------------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/doc/transceiver-monitor-hld.md b/doc/transceiver-monitor-hld.md index dc56e774a0..b078466e92 100644 --- a/doc/transceiver-monitor-hld.md +++ b/doc/transceiver-monitor-hld.md @@ -19,7 +19,7 @@ New Xcvrd in platform monitor container is designed to fetch the transceiver and For the transceiver it's self, the type, serial number, hardware version, etc. will not change after plug in. The suitable way for transceiver information update can be triggered by transceiver plug in/out event. -The transceiver dom sensor information(temperature, power,voltage, etc.) can change frequently, these information need to be updated periodically, for now the time period temporarily set to 120s(see open question 1), this time period need to be adjusted according the later on test on all vendors platform. +The transceiver dom sensor information(temperature, power,voltage, etc.) can change frequently, these information need to be updated periodically, for now the time period temporarily set to 60s(see open question 1), this time period need to be adjusted according the later on test on all vendors platform. If there is transceiver and sensor status change, Xcvrd will write the new status to state DB, to store these information some new tables will be added to STATE_DB. @@ -56,12 +56,12 @@ New Transceiver info table and transceiver DOM sensor table will be added to sta ### 1.2 Access eeprom from platform container ### -Transceiver information eeprom can be accessed via read files(e.g. /sys/bus/i2c/devices/2-0048/hwmon/hwmon4/qsfp9_eeprom), different vendors may have these files under different folders, these folder need to be mounted to platform container so Xcvrd can access them. +Transceiver information eeprom can be accessed via read files(e.g. `/sys/bus/i2c/devices/2-0048/hwmon/hwmon4/qsfp9_eeprom`), different vendors may have these files under different folders, these folder need to be mounted to platform container so Xcvrd can access them. For the convenience of implementation and reduce the time consuming, need to do enhancement to the `SfpUtilBase` class: -1. `SfpUtilBase` internally should add the ability to read the eeprom and only pick up the interested bytes by given offset and bumber of bytes. +1. `SfpUtilBase` internally should add the ability to read the eeprom and only pick up the interested bytes by given offset and number of bytes. 2. `SfpUtilBase` will provide APIs `get_eeprom_sfp_info_dict(self, port_num)` and `get_eeprom_dom_info_dict(self, port_num)` to return `eeprom_if_dict` and `eeprom_dom_dict` separately, the interested values of these two dict are defined in section 1.1.1 and 1.1.2. In these two APIs can pick up these values from eeprom by provide the corresponding offset and number of bytes. @@ -70,45 +70,37 @@ For the convenience of implementation and reduce the time consuming, need to do Xcvrd need to be triggered by transceiver plug in/out event to refresh the transceiver info table. -Transceiver plug in/out status can be derived from the content of sysfs file like `"/sys/bus/i2c/devices/2-0048/hwmon/hwmon7/qsfp10_status"`. +How to get this event is various on different platform, there is no common implementation available. -To get this sfp status file path for a certain port, each vendor need to implement a new API `get_sfp_status_file_path(self, port_num)` in the SFP plugin(class SfpUtil). +Here we define a common platform API to wait for this event in class `SfpUtilBase`: -Python lib [inotify](https://pypi.org/project/inotify/), is a good tool to monitor the file change and raise notification. + @abc.abstractmethod + def get_transceiver_change_event(self): + """ + :returns: Boolean, True if call successful, False if not; + dict for pysical port number and the SFP status. like {'0': 'PLUGIN', '31':'PLUGOUT'} + """ + return -Below is a sample for how to use inotify lib to monitor file change: +Each vendor need to implement this function in `SfpUtil` plugin. - import os - import inotify - import time - import inotify.adapters +Xcvrd will call this API to wait for the sfp plug in/out event, following example code showing how this API will be called: - def _main(): - i = inotify.adapters.Inotify() - i.add_watch(b'/sys/bus/i2c/devices/2-0048/hwmon/hwmon6/qsfp10_status') - try: - while True: - events = i.event_gen(timeout_s=1) - for event in events: - if event is not None: - (header, type_names, watch_path, filename) = event - print "MASK->NAMES=%s WATCH-PATH=[%s] FILENAME=[%s]" % (type_names, watch_path.decode('utf-8'),filename.decode('utf-8')) - print("no event found") - time.sleep(10) - - finally: - i.remove_watch(b'/sys/bus/i2c/devices/2-0048/hwmon/hwmon6/qsfp10_status') - - if __name__ == '__main__': - _main() + while True: + status, port_dict = platform_sfputil.get_transceiver_change_event() + if(status): + for key, value in port_dict.iteritems(): + print("SFP on port: %s" was %s" % (key, value)) + -Xcvrd will pass all the sfp status files to inotify and monitor them for the change. - -When a sfp status file change notification received by Xcvrd, by calling current SFP plugin API `get_presence(self, port_num)` it can get the SFP present status. ### 1.4 Xcvrd daemon flow ### -Xcvrd retrieve transceiver by event trigger, DOM sensor information will be periodically freshed, these infomation can be readed via sfputil. +Xcvrd will spawn a thread to wait for the SFP plug in/out event, when event received, it will update the DB entries accordingly. + +A timer will be started to periodically refresh the DOM sensor information . + +Detailed flow as showed in below chart: ![](https://github.com/keboliu/SONiC/blob/xcvrd-hld/images/transceiver_monitoring_hld/xcvrd_flow.svg) @@ -154,6 +146,6 @@ To get the transceiver and dom sensor status, SNMP agent need to connect to STAT ## 3. Open Questions ## -1. DOM sensor polling period need to be finialized after collecting enough data on various platform and later on test based on the new eerpom reading API. +1. DOM sensor polling period need to be finalized after collecting enough data on various platform and later on test based on the new eeprom reading API. From 8c3150dd1434ecd6beb576666bd7f1c00c894ef2 Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Wed, 27 Jun 2018 10:02:31 +0800 Subject: [PATCH 12/14] update API definition and mib definition. --- doc/transceiver-monitor-hld.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/transceiver-monitor-hld.md b/doc/transceiver-monitor-hld.md index b078466e92..fd862b3e82 100644 --- a/doc/transceiver-monitor-hld.md +++ b/doc/transceiver-monitor-hld.md @@ -75,10 +75,11 @@ How to get this event is various on different platform, there is no common imple Here we define a common platform API to wait for this event in class `SfpUtilBase`: @abc.abstractmethod - def get_transceiver_change_event(self): + def get_transceiver_change_event(self, timeout=0): """ + :param timeout: function will return success and a empty dict if no event in this period, default value 0 means never timeout. :returns: Boolean, True if call successful, False if not; - dict for pysical port number and the SFP status. like {'0': 'PLUGIN', '31':'PLUGOUT'} + dict for pysical port number and the SFP status, status '1' represent plug in, '0' represent plug out(eg. {'0': '1', '31':'0'}) """ return @@ -114,14 +115,14 @@ MIB table entPhysicalTable from [Entity MIB(RFC2737)](https://tools.ietf.org/htm | --- | --- | --- | --- | | 1.3.6.1.2.1.47.1.1.1 | entPhysicalTable | | | | 1.3.6.1.2.1.47.1.1.1.1 | entPhysicalEntry | | | -| 1.3.6.1.2.1.47.1.1.1.1.2. ifindex | entPhysicalDescr | Show interfaces alias | Xcvr for Ethernet29 | -| 1.3.6.1.2.1.47.1.1.1.1.7. ifindex | entPhysicalName | skipped | | -| 1.3.6.1.2.1.47.1.1.1.1.8. ifindex | entPhysicalHardwareVersion | Vendor Rev in CLI or sfputil | A1 | -| 1.3.6.1.2.1.47.1.1.1.1.9. ifindex | entPhysicalFirmwareVersion | Skipped | | -| 1.3.6.1.2.1.47.1.1.1.1.10.ifindex | entPhysicalSoftwareRevision | Skipped | | -| 1.3.6.1.2.1.47.1.1.1.1.11.ifindex | entPhysicalSerialNum | Vendor SN in CLI or sfputil | WW5062F | -| 1.3.6.1.2.1.47.1.1.1.1.12.ifindex | entPhysicalMfgName | Vendor Name in CLI or sfputil | FINISAR CORP | -| 1.3.6.1.2.1.47.1.1.1.1.13.ifindex | entPhysicalModelName | Vendor PN in CLI or sfputil| FCBN410QD3C02 | +| 1.3.6.1.2.1.47.1.1.1.1.2. index | entPhysicalDescr | Show interfaces alias | Xcvr for Ethernet29 | +| 1.3.6.1.2.1.47.1.1.1.1.7. index | entPhysicalName | skipped | | +| 1.3.6.1.2.1.47.1.1.1.1.8. index | entPhysicalHardwareVersion | Vendor Rev in CLI or sfputil | A1 | +| 1.3.6.1.2.1.47.1.1.1.1.9. index | entPhysicalFirmwareVersion | Skipped | | +| 1.3.6.1.2.1.47.1.1.1.1.10.index | entPhysicalSoftwareRevision | Skipped | | +| 1.3.6.1.2.1.47.1.1.1.1.11.index | entPhysicalSerialNum | Vendor SN in CLI or sfputil | WW5062F | +| 1.3.6.1.2.1.47.1.1.1.1.12.index | entPhysicalMfgName | Vendor Name in CLI or sfputil | FINISAR CORP | +| 1.3.6.1.2.1.47.1.1.1.1.13.index | entPhysicalModelName | Vendor PN in CLI or sfputil| FCBN410QD3C02 | Another entPhySensorTable which is defined in [Entity Sensor MIB(RFC3433)](https://tools.ietf.org/html/rfc3433) need to be new added. @@ -146,6 +147,6 @@ To get the transceiver and dom sensor status, SNMP agent need to connect to STAT ## 3. Open Questions ## -1. DOM sensor polling period need to be finalized after collecting enough data on various platform and later on test based on the new eeprom reading API. +1. DOM sensor polling period may need to be adjusted after collecting enough data on various platform. From a26ace7df61a55089dc31a2a9373aac98aef6c5c Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Fri, 6 Jul 2018 06:34:38 +0300 Subject: [PATCH 13/14] handle comments --- doc/transceiver-monitor-hld.md | 77 ++++++++++++++++------------------ 1 file changed, 35 insertions(+), 42 deletions(-) diff --git a/doc/transceiver-monitor-hld.md b/doc/transceiver-monitor-hld.md index dc56e774a0..ac98b62fed 100644 --- a/doc/transceiver-monitor-hld.md +++ b/doc/transceiver-monitor-hld.md @@ -19,7 +19,7 @@ New Xcvrd in platform monitor container is designed to fetch the transceiver and For the transceiver it's self, the type, serial number, hardware version, etc. will not change after plug in. The suitable way for transceiver information update can be triggered by transceiver plug in/out event. -The transceiver dom sensor information(temperature, power,voltage, etc.) can change frequently, these information need to be updated periodically, for now the time period temporarily set to 120s(see open question 1), this time period need to be adjusted according the later on test on all vendors platform. +The transceiver dom sensor information(temperature, power,voltage, etc.) can change frequently, these information need to be updated periodically, for now the time period temporarily set to 60s(see open question 1), this time period need to be adjusted according the later on test on all vendors platform. If there is transceiver and sensor status change, Xcvrd will write the new status to state DB, to store these information some new tables will be added to STATE_DB. @@ -56,12 +56,12 @@ New Transceiver info table and transceiver DOM sensor table will be added to sta ### 1.2 Access eeprom from platform container ### -Transceiver information eeprom can be accessed via read files(e.g. /sys/bus/i2c/devices/2-0048/hwmon/hwmon4/qsfp9_eeprom), different vendors may have these files under different folders, these folder need to be mounted to platform container so Xcvrd can access them. +Transceiver information eeprom can be accessed via read files(e.g. `/sys/bus/i2c/devices/2-0048/hwmon/hwmon4/qsfp9_eeprom`), different vendors may have these files under different folders, these folder need to be mounted to platform container so Xcvrd can access them. For the convenience of implementation and reduce the time consuming, need to do enhancement to the `SfpUtilBase` class: -1. `SfpUtilBase` internally should add the ability to read the eeprom and only pick up the interested bytes by given offset and bumber of bytes. +1. `SfpUtilBase` internally should add the ability to read the eeprom and only pick up the interested bytes by given offset and number of bytes. 2. `SfpUtilBase` will provide APIs `get_eeprom_sfp_info_dict(self, port_num)` and `get_eeprom_dom_info_dict(self, port_num)` to return `eeprom_if_dict` and `eeprom_dom_dict` separately, the interested values of these two dict are defined in section 1.1.1 and 1.1.2. In these two APIs can pick up these values from eeprom by provide the corresponding offset and number of bytes. @@ -70,45 +70,38 @@ For the convenience of implementation and reduce the time consuming, need to do Xcvrd need to be triggered by transceiver plug in/out event to refresh the transceiver info table. -Transceiver plug in/out status can be derived from the content of sysfs file like `"/sys/bus/i2c/devices/2-0048/hwmon/hwmon7/qsfp10_status"`. +How to get this event is various on different platform, there is no common implementation available. -To get this sfp status file path for a certain port, each vendor need to implement a new API `get_sfp_status_file_path(self, port_num)` in the SFP plugin(class SfpUtil). +Here we define a common platform API to wait for this event in class `SfpUtilBase`: -Python lib [inotify](https://pypi.org/project/inotify/), is a good tool to monitor the file change and raise notification. + @abc.abstractmethod + def get_transceiver_change_event(self, timeout=0): + """ + :param timeout: function will return success and a empty dict if no event in this period, default value 0 means never timeout. + :returns: Boolean, True if call successful, False if not; + dict for pysical port number and the SFP status, status '1' represent plug in, '0' represent plug out(eg. {'0': '1', '31':'0'}) + """ + return -Below is a sample for how to use inotify lib to monitor file change: +Each vendor need to implement this function in `SfpUtil` plugin. - import os - import inotify - import time - import inotify.adapters +Xcvrd will call this API to wait for the sfp plug in/out event, following example code showing how this API will be called: - def _main(): - i = inotify.adapters.Inotify() - i.add_watch(b'/sys/bus/i2c/devices/2-0048/hwmon/hwmon6/qsfp10_status') - try: - while True: - events = i.event_gen(timeout_s=1) - for event in events: - if event is not None: - (header, type_names, watch_path, filename) = event - print "MASK->NAMES=%s WATCH-PATH=[%s] FILENAME=[%s]" % (type_names, watch_path.decode('utf-8'),filename.decode('utf-8')) - print("no event found") - time.sleep(10) - - finally: - i.remove_watch(b'/sys/bus/i2c/devices/2-0048/hwmon/hwmon6/qsfp10_status') - - if __name__ == '__main__': - _main() + while True: + status, port_dict = platform_sfputil.get_transceiver_change_event() + if(status): + for key, value in port_dict.iteritems(): + print("SFP on port: %s" was %s" % (key, value)) + +It's possible that when received the plug in/out event, the transceiver eeprom is not ready for reading, so need to give another try if first reading failed. -Xcvrd will pass all the sfp status files to inotify and monitor them for the change. +### 1.4 Xcvrd daemon flow ### -When a sfp status file change notification received by Xcvrd, by calling current SFP plugin API `get_presence(self, port_num)` it can get the SFP present status. +Xcvrd will spawn a thread to wait for the SFP plug in/out event, when event received, it will update the DB entries accordingly. -### 1.4 Xcvrd daemon flow ### +A timer will be started to periodically refresh the DOM sensor information . -Xcvrd retrieve transceiver by event trigger, DOM sensor information will be periodically freshed, these infomation can be readed via sfputil. +Detailed flow as showed in below chart: ![](https://github.com/keboliu/SONiC/blob/xcvrd-hld/images/transceiver_monitoring_hld/xcvrd_flow.svg) @@ -122,14 +115,14 @@ MIB table entPhysicalTable from [Entity MIB(RFC2737)](https://tools.ietf.org/htm | --- | --- | --- | --- | | 1.3.6.1.2.1.47.1.1.1 | entPhysicalTable | | | | 1.3.6.1.2.1.47.1.1.1.1 | entPhysicalEntry | | | -| 1.3.6.1.2.1.47.1.1.1.1.2. ifindex | entPhysicalDescr | Show interfaces alias | Xcvr for Ethernet29 | -| 1.3.6.1.2.1.47.1.1.1.1.7. ifindex | entPhysicalName | skipped | | -| 1.3.6.1.2.1.47.1.1.1.1.8. ifindex | entPhysicalHardwareVersion | Vendor Rev in CLI or sfputil | A1 | -| 1.3.6.1.2.1.47.1.1.1.1.9. ifindex | entPhysicalFirmwareVersion | Skipped | | -| 1.3.6.1.2.1.47.1.1.1.1.10.ifindex | entPhysicalSoftwareRevision | Skipped | | -| 1.3.6.1.2.1.47.1.1.1.1.11.ifindex | entPhysicalSerialNum | Vendor SN in CLI or sfputil | WW5062F | -| 1.3.6.1.2.1.47.1.1.1.1.12.ifindex | entPhysicalMfgName | Vendor Name in CLI or sfputil | FINISAR CORP | -| 1.3.6.1.2.1.47.1.1.1.1.13.ifindex | entPhysicalModelName | Vendor PN in CLI or sfputil| FCBN410QD3C02 | +| 1.3.6.1.2.1.47.1.1.1.1.2. index | entPhysicalDescr | Show interfaces alias | Xcvr for Ethernet29 | +| 1.3.6.1.2.1.47.1.1.1.1.7. index | entPhysicalName | skipped | | +| 1.3.6.1.2.1.47.1.1.1.1.8. index | entPhysicalHardwareVersion | Vendor Rev in CLI or sfputil | A1 | +| 1.3.6.1.2.1.47.1.1.1.1.9. index | entPhysicalFirmwareVersion | Skipped | | +| 1.3.6.1.2.1.47.1.1.1.1.10.index | entPhysicalSoftwareRevision | Skipped | | +| 1.3.6.1.2.1.47.1.1.1.1.11.index | entPhysicalSerialNum | Vendor SN in CLI or sfputil | WW5062F | +| 1.3.6.1.2.1.47.1.1.1.1.12.index | entPhysicalMfgName | Vendor Name in CLI or sfputil | FINISAR CORP | +| 1.3.6.1.2.1.47.1.1.1.1.13.index | entPhysicalModelName | Vendor PN in CLI or sfputil| FCBN410QD3C02 | Another entPhySensorTable which is defined in [Entity Sensor MIB(RFC3433)](https://tools.ietf.org/html/rfc3433) need to be new added. @@ -154,6 +147,6 @@ To get the transceiver and dom sensor status, SNMP agent need to connect to STAT ## 3. Open Questions ## -1. DOM sensor polling period need to be finialized after collecting enough data on various platform and later on test based on the new eerpom reading API. +1. DOM sensor polling period may need to be adjusted after collecting enough data on various platform. From 76858e444fa12475a7aa9e99365de3a53ab29ee7 Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Fri, 6 Jul 2018 06:39:06 +0300 Subject: [PATCH 14/14] update pic link --- doc/transceiver-monitor-hld.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/transceiver-monitor-hld.md b/doc/transceiver-monitor-hld.md index ac98b62fed..fd1120f3ab 100644 --- a/doc/transceiver-monitor-hld.md +++ b/doc/transceiver-monitor-hld.md @@ -103,7 +103,7 @@ A timer will be started to periodically refresh the DOM sensor information . Detailed flow as showed in below chart: -![](https://github.com/keboliu/SONiC/blob/xcvrd-hld/images/transceiver_monitoring_hld/xcvrd_flow.svg) +![](https://github.com/Azure/SONiC/blob/gh-pages/images/transceiver_monitoring_hld/xcvrd_flow.svg) ## 2. SNMP Agent Change ##