diff --git a/dockers/docker-platform-monitor/config.sh b/dockers/docker-platform-monitor/config.sh index ece507b7cc..a74c2f5c90 100755 --- a/dockers/docker-platform-monitor/config.sh +++ b/dockers/docker-platform-monitor/config.sh @@ -3,7 +3,11 @@ mkdir -p /etc/sensors.d hwsku=`sonic-cfggen -m /etc/sonic/minigraph.xml -v minigraph_hwsku` -/bin/cp -rf /usr/share/sonic/$hwsku/sensors.conf /etc/sensors.d/ + +if [ -e /usr/share/sonic/$hwsku/sensors.conf ] +then + /bin/cp -rf /usr/share/sonic/$hwsku/sensors.conf /etc/sensors.d/ +fi mkdir -p /var/sonic echo "# Config files managed by sonic-config-engine" >/var/sonic/config_status diff --git a/src/sonic-config-engine/platform/Arista-7050-QX32/alias_map.json b/src/sonic-config-engine/platform/Arista-7050-QX32/alias_map.json new file mode 100644 index 0000000000..90b35011e2 --- /dev/null +++ b/src/sonic-config-engine/platform/Arista-7050-QX32/alias_map.json @@ -0,0 +1,34 @@ +{ + "Ethernet8": "Ethernet3/1", + "Ethernet0": "Ethernet1/1", + "Ethernet4": "Ethernet2/1", + "Ethernet108": "Ethernet28", + "Ethernet100": "Ethernet26", + "Ethernet104": "Ethernet27", + "Ethernet96": "Ethernet25", + "Ethernet124": "Ethernet32", + "Ethernet120": "Ethernet31", + "Ethernet92": "Ethernet24/1", + "Ethernet28": "Ethernet8/1", + "Ethernet52": "Ethernet14/1", + "Ethernet56": "Ethernet15/1", + "Ethernet76": "Ethernet20/1", + "Ethernet72": "Ethernet19/1", + "Ethernet32": "Ethernet9/1", + "Ethernet16": "Ethernet5/1", + "Ethernet36": "Ethernet10/1", + "Ethernet12": "Ethernet4/1", + "Ethernet88": "Ethernet23/1", + "Ethernet24": "Ethernet7/1", + "Ethernet116": "Ethernet30", + "Ethernet80": "Ethernet21/1", + "Ethernet112": "Ethernet29", + "Ethernet84": "Ethernet22/1", + "Ethernet48": "Ethernet13/1", + "Ethernet44": "Ethernet12/1", + "Ethernet40": "Ethernet11/1", + "Ethernet64": "Ethernet17/1", + "Ethernet60": "Ethernet16/1", + "Ethernet20": "Ethernet6/1", + "Ethernet68": "Ethernet18/1" +} \ No newline at end of file diff --git a/src/sonic-config-engine/platform/Arista-7050-QX32/port_config.ini b/src/sonic-config-engine/platform/Arista-7050-QX32/port_config.ini new file mode 100644 index 0000000000..ec12639d72 --- /dev/null +++ b/src/sonic-config-engine/platform/Arista-7050-QX32/port_config.ini @@ -0,0 +1,33 @@ +# alias lanes +Ethernet0 125,126,127,128 +Ethernet4 121,122,123,124 +Ethernet8 13,14,15,16 +Ethernet12 9,10,11,12 +Ethernet16 17,18,19,20 +Ethernet20 21,22,23,24 +Ethernet24 25,26,27,28 +Ethernet28 29,30,31,32 +Ethernet32 37,38,39,40 +Ethernet36 33,34,35,36 +Ethernet40 45,46,47,48 +Ethernet44 41,42,43,44 +Ethernet48 53,54,55,56 +Ethernet52 49,50,51,52 +Ethernet56 69,70,71,72 +Ethernet60 65,66,67,68 +Ethernet64 77,78,79,80 +Ethernet68 73,74,75,76 +Ethernet72 93,94,95,96 +Ethernet76 89,90,91,92 +Ethernet80 101,102,103,104 +Ethernet84 97,98,99,100 +Ethernet88 109,110,111,112 +Ethernet92 105,106,107,108 +Ethernet96 61,62,63,64 +Ethernet100 57,58,59,60 +Ethernet104 81,82,83,84 +Ethernet108 85,86,87,88 +Ethernet112 117,118,119,120 +Ethernet116 113,114,115,116 +Ethernet120 5,6,7,8 +Ethernet124 1,2,3,4 diff --git a/src/sonic-config-engine/platform/Arista-7050-QX32/sensors.conf b/src/sonic-config-engine/platform/Arista-7050-QX32/sensors.conf new file mode 100644 index 0000000000..7745054a05 --- /dev/null +++ b/src/sonic-config-engine/platform/Arista-7050-QX32/sensors.conf @@ -0,0 +1,79 @@ +# libsensors configuration file +# ---------------------------------------------- +# + +bus "i2c-2" "SCD SMBus master 0 bus 0" +bus "i2c-3" "SCD SMBus master 0 bus 1" +bus "i2c-5" "SCD SMBus master 0 bus 3" +bus "i2c-6" "SCD SMBus master 0 bus 4" +bus "i2c-7" "SCD SMBus master 0 bus 5" + +chip "k10temp-pci-00c3" + label temp1 "Cpu temp sensor" + +chip "lm73-i2c-3-48" + label temp1 "Rear Temp Sensor" + set temp1_max 65 + #set temp1_max_alarm 75 # read-only + +chip "lm86-i2c-2-4c" + label temp1 "Board Temp Sensor" + set temp1_max 65 + set temp1_crit 75 + + label temp2 "Front-panel Temp Sensor" + set temp2_max 65 + set temp2_crit 75 + +chip "pmbus-i2c-3-4e" + label temp1 "Power Controller Sensor 1" + set temp1_max 60 + set temp1_crit 70 + + label temp2 "Power Controller Sensor 2" + set temp2_max 60 + set temp2_crit 70 + + ignore curr1 + +chip "pmbus-i2c-5-58" + label temp1 "Power Supply 1 Sensor 1" + set temp1_max 60 + set temp1_crit 70 + + label temp2 "Power Supply 1 Sensor 2" + set temp2_max 60 + set temp2_crit 70 + + ignore temp3 + + set in1_max 250 + set in1_crit 255 + set power1_max 525 + set power2_max 460 + set power2_crit 462 + set curr1_max 5.28 + set curr1_crit 5.30 + set curr2_max 36 + set curr2_crit 37 + +chip "pmbus-i2c-6-58" + label temp1 "Power Supply 2 Sensor 1" + set temp1_max 60 + set temp1_crit 70 + + label temp2 "Power Supply 2 Sensor 2" + set temp2_max 60 + set temp2_crit 70 + + ignore temp3 + + set in1_max 250 + set in1_crit 255 + set power1_max 525 + set power2_max 460 + set power2_crit 462 + set curr1_max 5.28 + set curr1_crit 5.30 + set curr2_max 36 + set curr2_crit 37 diff --git a/src/sonic-config-engine/platform/Force10-S6100/alias_map.json b/src/sonic-config-engine/platform/Force10-S6100/alias_map.json new file mode 100644 index 0000000000..19a1ef662d --- /dev/null +++ b/src/sonic-config-engine/platform/Force10-S6100/alias_map.json @@ -0,0 +1,66 @@ +{ + "Ethernet0": "fortyGigE1/1/1", + "Ethernet1": "fortyGigE1/1/2", + "Ethernet2": "fortyGigE1/1/3", + "Ethernet3": "fortyGigE1/1/4", + "Ethernet4": "fortyGigE1/1/5", + "Ethernet5": "fortyGigE1/1/6", + "Ethernet6": "fortyGigE1/1/7", + "Ethernet7": "fortyGigE1/1/8", + "Ethernet8": "fortyGigE1/1/9", + "Ethernet9": "fortyGigE1/1/10", + "Ethernet10": "fortyGigE1/1/11", + "Ethernet11": "fortyGigE1/1/12", + "Ethernet12": "fortyGigE1/1/13", + "Ethernet13": "fortyGigE1/1/14", + "Ethernet14": "fortyGigE1/1/15", + "Ethernet15": "fortyGigE1/1/16", + "Ethernet16": "fortyGigE1/2/1", + "Ethernet17": "fortyGigE1/2/2", + "Ethernet18": "fortyGigE1/2/3", + "Ethernet19": "fortyGigE1/2/4", + "Ethernet20": "fortyGigE1/2/5", + "Ethernet21": "fortyGigE1/2/6", + "Ethernet22": "fortyGigE1/2/7", + "Ethernet23": "fortyGigE1/2/8", + "Ethernet24": "fortyGigE1/2/9", + "Ethernet25": "fortyGigE1/2/10", + "Ethernet26": "fortyGigE1/2/11", + "Ethernet27": "fortyGigE1/2/12", + "Ethernet28": "fortyGigE1/2/13", + "Ethernet29": "fortyGigE1/2/14", + "Ethernet30": "fortyGigE1/2/15", + "Ethernet31": "fortyGigE1/2/16", + "Ethernet32": "fortyGigE1/3/1", + "Ethernet33": "fortyGigE1/3/2", + "Ethernet34": "fortyGigE1/3/3", + "Ethernet34": "fortyGigE1/3/4", + "Ethernet36": "fortyGigE1/3/5", + "Ethernet37": "fortyGigE1/3/6", + "Ethernet38": "fortyGigE1/3/7", + "Ethernet39": "fortyGigE1/3/8", + "Ethernet40": "fortyGigE1/3/9", + "Ethernet41": "fortyGigE1/3/10", + "Ethernet42": "fortyGigE1/3/11", + "Ethernet43": "fortyGigE1/3/12", + "Ethernet44": "fortyGigE1/3/13", + "Ethernet45": "fortyGigE1/3/14", + "Ethernet46": "fortyGigE1/3/15", + "Ethernet47": "fortyGigE1/3/16", + "Ethernet48": "fortyGigE1/4/1", + "Ethernet49": "fortyGigE1/4/2", + "Ethernet50": "fortyGigE1/4/3", + "Ethernet51": "fortyGigE1/4/4", + "Ethernet52": "fortyGigE1/4/5", + "Ethernet53": "fortyGigE1/4/6", + "Ethernet54": "fortyGigE1/4/7", + "Ethernet55": "fortyGigE1/4/8", + "Ethernet56": "fortyGigE1/4/9", + "Ethernet57": "fortyGigE1/4/10", + "Ethernet58": "fortyGigE1/4/11", + "Ethernet59": "fortyGigE1/4/12", + "Ethernet60": "fortyGigE1/4/13", + "Ethernet61": "fortyGigE1/4/14", + "Ethernet62": "fortyGigE1/4/15", + "Ethernet63": "fortyGigE1/4/16" +} diff --git a/src/sonic-config-engine/platform/Force10-S6100/port_config.ini b/src/sonic-config-engine/platform/Force10-S6100/port_config.ini new file mode 100644 index 0000000000..d0af86ad1a --- /dev/null +++ b/src/sonic-config-engine/platform/Force10-S6100/port_config.ini @@ -0,0 +1,65 @@ +# alias lanes +Ethernet0 1,2 +Ethernet1 3,4 +Ethernet2 5,6 +Ethernet3 7,8 +Ethernet4 9,10 +Ethernet5 11,12 +Ethernet6 13,14 +Ethernet7 15,16 +Ethernet8 17,18 +Ethernet9 19,20 +Ethernet10 21,22 +Ethernet11 23,24 +Ethernet12 25,26 +Ethernet13 27,28 +Ethernet14 29,30 +Ethernet15 31,32 +Ethernet16 33,34 +Ethernet17 35,36 +Ethernet18 37,38 +Ethernet19 39,40 +Ethernet20 41,42 +Ethernet21 43,44 +Ethernet22 45,46 +Ethernet23 47,48 +Ethernet24 49,50 +Ethernet25 51,52 +Ethernet26 53,54 +Ethernet27 55,56 +Ethernet28 57,58 +Ethernet29 59,60 +Ethernet30 61,62 +Ethernet31 63,64 +Ethernet32 65,66 +Ethernet33 67,68 +Ethernet34 69,70 +Ethernet35 71,72 +Ethernet36 73,74 +Ethernet37 75,76 +Ethernet38 77,78 +Ethernet39 79,80 +Ethernet40 81,82 +Ethernet41 83,84 +Ethernet42 85,86 +Ethernet43 87,88 +Ethernet44 89,90 +Ethernet45 91,92 +Ethernet46 93,94 +Ethernet47 95,96 +Ethernet48 97,98 +Ethernet49 99,100 +Ethernet50 101,102 +Ethernet51 103,104 +Ethernet52 105,106 +Ethernet53 107,108 +Ethernet54 109,110 +Ethernet55 111,112 +Ethernet56 113,114 +Ethernet57 115,116 +Ethernet58 117,118 +Ethernet59 119,120 +Ethernet60 121,122 +Ethernet61 123,124 +Ethernet62 125,126 +Ethernet63 127,128 diff --git a/src/sonic-config-engine/setup.py b/src/sonic-config-engine/setup.py index af2f6f414d..4c11ceb604 100644 --- a/src/sonic-config-engine/setup.py +++ b/src/sonic-config-engine/setup.py @@ -9,11 +9,11 @@ def get_platform_file_list(): data_path = os.path.join(repo_path, 'platform') platforms = os.listdir(data_path) for platform in platforms: - data_files.append( (os.path.join('/usr/share/sonic', platform), - ['platform/' + platform + '/alias_map.json', - 'platform/' + platform + '/port_config.ini', - 'platform/' + platform + '/sensors.conf'] - )) + files = ['platform/' + platform + '/alias_map.json', + 'platform/' + platform + '/port_config.ini'] + if os.path.isfile( os.path.join(data_path, platform, 'sensors.conf') ): + files.append('platform/' + platform + '/sensors.conf') #Not all platforms need to have a sensors.conf file + data_files.append( (os.path.join('/usr/share/sonic', platform), files) ) return data_files setup(name='sonic-config-engine',