diff options
author | George Hung <george.hung@quantatw.com> | 2021-03-08 11:45:06 +0300 |
---|---|---|
committer | Brandon Kim <brandonkim@google.com> | 2021-03-09 01:36:49 +0300 |
commit | 027c05505532d5cd7d21c14a9add2e4daa711710 (patch) | |
tree | 7628ed145e1430808c52233fe5484ac42c3b27c4 /meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh | |
parent | 52a81c2d31e9e3acebfad9969db0efc6bb997389 (diff) | |
download | openbmc-027c05505532d5cd7d21c14a9add2e4daa711710.tar.xz |
meta-quanta: gbs: update NVMe SSD and CPU margin temperatures config
1. Change CPU margin from 13C to 15C
2. NVMe SSD margin = WCTemp - 7
(WCTemp = Warning Composite Temperature Threshold)
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: Id9af01305764132fa537afada073826f3d37125e
Diffstat (limited to 'meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh')
-rw-r--r-- | meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh b/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh index 2e44479f6..d0cb2f632 100644 --- a/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh +++ b/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh @@ -20,6 +20,31 @@ do mapper wait $path done +nvmePath="/xyz/openbmc_project/sensors/temperature/nvme" +nvmeInventoryPath="/xyz/openbmc_project/inventory/system/chassis/motherboard/nvme" +# Get and Set WCTEMP +for ((i = 0; i < 16; i++)); do + name=WCTemp$(printf "%02d" $i) + wcTemp=72000 + presentState=$(busctl get-property \ + xyz.openbmc_project.Inventory.Manager \ + ${nvmeInventoryPath}${i} \ + xyz.openbmc_project.Inventory.Item \ + Present | awk '{print $2}') + + if [[ $presentState == "true" ]]; then + wcTemp=$( + busctl get-property xyz.openbmc_project.nvme.manager \ + ${nvmePath}${i} \ + xyz.openbmc_project.Sensor.Threshold.Critical \ + CriticalHigh | awk '{print $2}' + ) + wcTemp=$((wcTemp * 1000)) + fi + + sed -i "s/$name/${wcTemp}/g" $MARGIN_TABLE_FILE +done + # start read margin temp /usr/bin/read-margin-temp & |