diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c94572..20789ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,6 +93,6 @@
 install (FILES ${CONFIG_FILES} DESTINATION ${PACKAGE_DIR})
 
 if(BIC)
-set (CONFIG_FILES_YV2 yosemitev2/gpio_desc.json)
+set (CONFIG_FILES_YV2 yosemitev2/gpio_desc.json yosemitev2/cri_sensors.json)
 install (FILES ${CONFIG_FILES_YV2} DESTINATION ${PACKAGE_DIR})
 endif()
diff --git a/include/usb-dbg.hpp b/include/usb-dbg.hpp
index 743829b..608ee41 100644
--- a/include/usb-dbg.hpp
+++ b/include/usb-dbg.hpp
@@ -24,6 +24,8 @@
 #include <nlohmann/json.hpp>
 #include <phosphor-logging/log.hpp>
 #include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/asio/property.hpp>
+#include <ipmid/utils.hpp>
 
 #include <fstream>
 #include <iomanip>
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index d06bb17..ea5da82 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -337,6 +337,20 @@
     return rc;
 }
 
+bool isMultiHostPlatform()
+{
+    bool platform;
+    if (INSTANCES == "0")
+    {
+        platform = false;
+    }
+    else
+    {
+        platform = true;
+    }
+    return platform;
+}
+
 // return code: 0 successful
 int8_t getFruData(std::string& data, std::string& name)
 {
diff --git a/src/usb-dbg.cpp b/src/usb-dbg.cpp
index 472d4ae..55ba20c 100644
--- a/src/usb-dbg.cpp
+++ b/src/usb-dbg.cpp
@@ -22,6 +22,17 @@
 ipmi_ret_t getNetworkData(uint8_t lan_param, char* data);
 int8_t getFruData(std::string& serial, std::string& name);
 
+bool isMultiHostPlatform();
+
+/* Declare Host Selector interface and path */
+namespace selector
+{
+const std::string path = "/xyz/openbmc_project/Chassis/Buttons/HostSelector";
+const std::string interface =
+    "xyz.openbmc_project.Chassis.HostSelector.Selector";
+const std::string propertyName = "Position";
+} // namespace selector
+
 /* Declare storage functions used here */
 namespace storage
 {
@@ -29,14 +40,49 @@
 int getSensorUnit(std::string&, std::string&);
 } // namespace storage
 
+size_t getSelectorPosition()
+{
+    std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
+    std::string service =
+        getService(*dbus, ipmi::selector::interface, ipmi::selector::path);
+    Value variant = getDbusProperty(*dbus, service, ipmi::selector::path,
+                                    ipmi::selector::interface,
+                                    ipmi::selector::propertyName);
+    size_t result = std::get<size_t>(variant);
+    return result;
+}
+
 static int panelNum = (sizeof(panels) / sizeof(struct ctrl_panel)) - 1;
 
 /* Returns the FRU the hand-switch is switched to. If it is switched to BMC
  * it returns FRU_ALL. Note, if in err, it returns FRU_ALL */
-static uint8_t plat_get_fru_sel()
+static size_t plat_get_fru_sel()
 {
-    // For Tiogapass it just return 1, can modify to support more platform
-    return 1;
+    size_t position;
+    bool platform = isMultiHostPlatform();
+
+    if (platform == true)
+    {
+        try
+        {
+            size_t hostPosition = getSelectorPosition();
+            position = hostPosition;
+            if (position == BMC_POSITION)
+            {
+                return FRU_ALL;
+            }
+        }
+        catch (...)
+        {
+            std::cout << "Error reading host selector position" << std::endl;
+        }
+    }
+    else
+    {
+        // For Tiogapass it just return 1, can modify to support more platform
+        position = 1;
+    }
+    return position;
 }
 
 // return 0 on seccuess
@@ -315,7 +361,7 @@
 {
     FILE* fp;
     struct stat file_stat;
-    uint8_t pos = plat_get_fru_sel();
+    size_t pos = plat_get_fru_sel();
     static uint8_t pre_pos = 0xff;
 
     fp = fopen("/mnt/data/cri_sel", "r");
@@ -545,7 +591,7 @@
     const char* ptr;
     FILE* fp;
     struct stat file_stat;
-    uint8_t pos = plat_get_fru_sel();
+    size_t pos = plat_get_fru_sel();
     static uint8_t pre_pos = FRU_ALL;
     bool pos_changed = pre_pos != pos;
 
@@ -628,6 +674,7 @@
 {
     int ret;
     double fvalue;
+    size_t pos = plat_get_fru_sel();
 
     if (page == 1)
     {
@@ -661,6 +708,11 @@
             std::string senName = j.key();
             auto val = j.value();
 
+            if (senName[0] == '_')
+            {
+                senName = std::to_string(pos) + senName;
+            }
+
             if (ipmi::storage::getSensorValue(senName, fvalue) == 0)
             {
                 std::stringstream ss;
@@ -862,7 +914,7 @@
                               uint8_t* count, uint8_t* buffer)
 {
     char line_buff[1000], *pres_dev = line_buff;
-    uint8_t pos = plat_get_fru_sel();
+    size_t pos = plat_get_fru_sel();
     const char* delim = "\n";
     int ret;
     std::string serialName = "BOARD_SERIAL_NUMBER";
@@ -1012,7 +1064,7 @@
 {
     int i;
     unsigned char buff[MAX_VALUE_LEN], pickup, len;
-    uint8_t pos = plat_get_fru_sel();
+    size_t pos = plat_get_fru_sel();
 
     /* To be implemented */
     /*
@@ -1089,7 +1141,7 @@
 {
     uint8_t buff[32] = {0};
     uint8_t res_len;
-    uint8_t pos = plat_get_fru_sel();
+    size_t pos = plat_get_fru_sel();
     uint8_t policy;
     //  uint8_t pwr_policy_item_map[3] = {POWER_CFG_ON, POWER_CFG_LPS,
     //  POWER_CFG_OFF};
diff --git a/yosemitev2/cri_sensors.json b/yosemitev2/cri_sensors.json
new file mode 100644
index 0000000..942426c
--- /dev/null
+++ b/yosemitev2/cri_sensors.json
@@ -0,0 +1,47 @@
+{
+        "_SOC_Temp":
+        {
+                "short_name": "SOC_TEMP:"
+        },
+        "_PVCCIN_VR_Temp":
+        {
+                "short_name": "SOC_VR_TEMP:"
+        },
+        "_PVCCIN_VR_Pout":
+        {
+                "short_name": "SOC_VR_PWR:"
+        },
+        "_SOC_DIMMA0_Temp":
+        {
+                "short_name": "DIMMA0_TEMP:"
+        },
+        "_SOC_DIMMA1_Temp":
+        {
+                "short_name": "DIMMA1_TEMP:",
+                "precision": 1
+        },
+        "_SOC_DIMMB0_Temp":
+        {
+                "short_name": "DIMMB0_TEMP:"
+        },
+        "_SOC_DIMMB1_Temp":
+        {
+                "short_name": "DIMMB1_TEMP:"
+        },
+        "_SOC_DIMMD0_Temp":
+        {
+                "short_name": "DIMMD0_TEMP:"
+        },
+        "_SOC_DIMMD1_Temp":
+        {
+                "short_name": "DIMMD1_TEMP:"
+        },
+        "_SOC_DIMME0_Temp":
+        {
+                "short_name": "DIMME0_TEMP:"
+        },
+        "_SOC_DIMME1_Temp":
+        {
+                "short_name": "DIMME1_TEMP:"
+        }
+}
