Skip to content

Add SAI_SWITCH_ATTR_CURRENT_TEMP to get average temperature from sensors#880

Merged
lguohan merged 4 commits intoopencomputeproject:masterfrom
padmanarayana:sai_current_sensor_temperature
Nov 8, 2018
Merged

Add SAI_SWITCH_ATTR_CURRENT_TEMP to get average temperature from sensors#880
lguohan merged 4 commits intoopencomputeproject:masterfrom
padmanarayana:sai_current_sensor_temperature

Conversation

@padmanarayana
Copy link
Contributor

Retrieve the average of sensors value readings from the ASIC.

inc/saiswitch.h Outdated

/**
* @brief The average value of the temperature
* retrieved from the switch sensors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean from all available sensors? not sure if description is good enough, if you have 1 sensor with 10 degree, and 2nd with 100 then average is 55 which maybe ok but system is defenetly not ok at 100

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, assuming ASIC has N internal sensors, we wanted the average of the N sensors. I can update the description. This attribute is meant to be interpreted in conjunction with the MAX_TEMP to check for deviation / discard outliers (so there are no false alarms). Alternatively, we can get the list of N values (instead of just MAX_TEMP & CURRENT_TEMP) and let the application interpret ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating description should be fine

@padmanarayana
Copy link
Contributor Author

padmanarayana commented Oct 22, 2018 via email

@padmanarayana
Copy link
Contributor Author

As suggested in the review meeting:

  1. Added SAI_SWITCH_ATTR_MAX_NUMBER_OF_TEMP_SENSORS & SAI_SWITCH_ATTR_TEMP_LIST.
  2. Renamed SAI_SWITCH_ATTR_CURRENT_TEMP as SAI_SWITCH_ATTR_AVERAGE_TEMP.

@lguohan lguohan merged commit be1fe4c into opencomputeproject:master Nov 8, 2018
jleveque pushed a commit to sonic-net/sonic-swss that referenced this pull request Jan 4, 2021
**What I did**
1) ASICs have multiple internal thermal sensors.
2) With the help of configuration, a poller is introduced in Orchagent that will periodically retrieve values of these sensors with the help of SAI APIs (opencomputeproject/SAI#880).
3) These retrieved values are being populated to the state DB (In "ASIC_TEMPERATURE_INFO" table).

**Why I did it**
As part of ASIC Thermal Monitoring HLD.
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
**What I did**
1) ASICs have multiple internal thermal sensors.
2) With the help of configuration, a poller is introduced in Orchagent that will periodically retrieve values of these sensors with the help of SAI APIs (opencomputeproject/SAI#880).
3) These retrieved values are being populated to the state DB (In "ASIC_TEMPERATURE_INFO" table).

**Why I did it**
As part of ASIC Thermal Monitoring HLD.
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.

5 participants