Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial add of Sensor Base package file #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samaity
Copy link
Contributor

@samaity samaity commented May 5, 2020

-What I did
added sensor_base.py package to "sonic-platform-common" so that SONiC CLI provides output of "show environment" for NON-BMC CPU and also switch CPU.

-How I verified

OUTPUT from SONiC with BMC cpu

admin@falco-open19-flex:~$ show environment --verbose
Command: sudo sensorutil summary
connection established

** BMC CPU OUTPUT ****
tmp75-i2c-3-48
Adapter: ast_i2c.3
Outlet Middle Temp:  +24.4 C  (high = +80.0 C, hyst = +75.0 C)

tmp75-i2c-3-49
Adapter: ast_i2c.3
Inlet Middle Temp:  +35.5 C  (high = +80.0 C, hyst = +75.0 C)

tmp75-i2c-3-4a
Adapter: ast_i2c.3
Inlet Left Temp:  +31.0 C  (high = +80.0 C, hyst = +75.0 C)

tmp75-i2c-3-4b
Adapter: ast_i2c.3
Switch Temp:  +30.2 C  (high = +80.0 C, hyst = +75.0 C)

tmp75-i2c-3-4c
Adapter: ast_i2c.3
Inlet Right Temp:  +30.6 C  (high = +80.0 C, hyst = +75.0 C)

com_e_driver-i2c-4-33
Adapter: ast_i2c.4
CPU Vcore:      +1.79 V
+3V Voltage:    +3.30 V
+5V Voltage:    +5.07 V
+12V Voltage:  +11.55 V
VDIMM Voltage:  +1.21 V
Memory Temp:    +27.9 C
CPU Temp:       +37.0 C

ltc4151-i2c-7-6f
Adapter: ast_i2c.7
vout1:            N/A
iout1:            N/A

fancpld-i2c-8-33
Adapter: ast_i2c.8
Fan 1 front: 10200 RPM
Fan 1 rear:  8400 RPM
Fan 2 front: 10200 RPM
Fan 2 rear:  8250 RPM
Fan 3 front: 10200 RPM
Fan 3 rear:  8400 RPM
Fan 4 front: 10350 RPM
Fan 4 rear:  8400 RPM
Fan 5 front: 10350 RPM
Fan 5 rear:  8400 RPM

tmp75-i2c-8-48
Adapter: ast_i2c.8
Outlet Right Temp:  +21.1 C  (high = +80.0 C, hyst = +75.0 C)

tmp75-i2c-8-49
Adapter: ast_i2c.8
Outlet Left Temp:  +21.8 C  (high = +80.0 C, hyst = +75.0 C)

** SONiC CPU OUTPUT ****
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +34.0 C  (high = +82.0 C, crit = +104.0 C)
Core 0:         +34.0 C  (high = +82.0 C, crit = +104.0 C)
Core 1:         +34.0 C  (high = +82.0 C, crit = +104.0 C)
Core 2:         +34.0 C  (high = +82.0 C, crit = +104.0 C)
Core 3:         +34.0 C  (high = +82.0 C, crit = +104.0 C)

OUTPUT from SONiC without BMC cpu

admin@lnos-x1-a-csw04:~$ show environment --verbose
Command: sudo sensorutil summary
/usr/share/sonic/device/x86_64-cel_seastone-r0/plugins/sensorutil.py
** SONiC CPU OUTPUT ****
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +22.0 C  (high = +98.0 C, crit = +98.0 C)
Core 1:       +22.0 C  (high = +98.0 C, crit = +98.0 C)
Core 2:       +22.0 C  (high = +98.0 C, crit = +98.0 C)
Core 3:       +22.0 C  (high = +98.0 C, crit = +98.0 C)

dx010_lm75b-i2c-5-48
Adapter: i2c-0-mux (chan_id 3)
Rear-panel temp sensor 1:  +19.5 C  (high = +43.0 C, hyst = +28.0 C)

dx010_lm75b-i2c-6-49
Adapter: i2c-0-mux (chan_id 4)
Front-panel temp sensor 2:  +25.4 C  (high = +43.0 C, hyst = +28.0 C)

dx010_lm75b-i2c-7-4a
Adapter: i2c-0-mux (chan_id 5)
ASIC temp sensor:  +42.0 C  (high = +43.0 C, hyst = +28.0 C)

dx010_lm75b-i2c-14-48
Adapter: i2c-0-mux (chan_id 4)
Rear-panel temp sensor 1:  +28.4 C  (high = +43.0 C, hyst = +28.0 C)

dx010_lm75b-i2c-15-4e
Adapter: i2c-0-mux (chan_id 5)
Rear-panel temp sensor 2:  +27.6 C  (high = +43.0 C, hyst = +28.0 C)

emc2305-i2c-13-2e
Adapter: i2c-0-mux (chan_id 3)
fan2:        7136 RPM  (div = 4)
fan1:        7021 RPM  (div = 4)
fan5:        6971 RPM  (div = 4)
fan3:        7136 RPM  (div = 4)
fan4:        6984 RPM  (div = 4)

emc2305-i2c-13-4d
Adapter: i2c-0-mux (chan_id 3)
fan5:        6850 RPM  (div = 4)
fan1:        6910 RPM  (div = 4)
fan4:        6898 RPM  (div = 4)
fan2:        7009 RPM  (div = 4)
fan3:        6886 RPM  (div = 4)

dps460-i2c-10-5a
Adapter: i2c-0-mux (chan_id 0)
vin:                          +210.50 V  (crit min = +90.00 V, min = +100.00 V)
                                        (max = +240.00 V, crit max = +264.00 V)
vout1:                        +12.30 V  (crit min = +11.00 V, min = +11.40 V)
                                        (max = +12.60 V, crit max = +13.00 V)
fan1:                         4616 RPM
Power Supply 1 temp sensor 1:  +36.0 C  (low  =  +0.0 C, high = +100.0 C)
                                        (crit low =  +0.0 C, crit =  +0.0 C)
Power Supply 1 temp sensor 2:  +51.5 C  (low  =  +0.0 C, high = +100.0 C)
                                        (crit low =  +0.0 C, crit =  +0.0 C)
Power Supply 1 temp sensor 3:   +0.0 C  (low  =  +0.0 C, high = +100.0 C)
                                        (crit low =  +0.0 C, crit =  +0.0 C)
pin:                           84.88 W  (max = 944.00 W)
pout1:                         74.38 W  (max = 840.00 W, crit =   0.00 W)
                                        (cap =   0.00 W)
iin:                           +0.43 A  (max =  +5.19 A, crit max =  +5.40 A)
iout1:                         +6.05 A  (crit min =  +0.00 A, max = +68.25 A)
                                        (crit max = +71.50 A)

dps460-i2c-11-5b
Adapter: i2c-0-mux (chan_id 1)
vin:                          +211.00 V  (crit min = +90.00 V, min = +100.00 V)
                                        (max = +240.00 V, crit max = +264.00 V)
vout1:                        +12.31 V  (crit min = +11.00 V, min = +11.40 V)
                                        (max = +12.60 V, crit max = +13.00 V)
fan1:                         4616 RPM
Power Supply 2 temp sensor 1:  +37.5 C  (low  =  +0.0 C, high = +100.0 C)
                                        (crit low =  +0.0 C, crit =  +0.0 C)
Power Supply 2 temp sensor 2:  +53.0 C  (low  =  +0.0 C, high = +100.0 C)
                                        (crit low =  +0.0 C, crit =  +0.0 C)
Power Supply 2 temp sensor 3:   +0.0 C  (low  =  +0.0 C, high = +100.0 C)
                                        (crit low =  +0.0 C, crit =  +0.0 C)
pin:                           80.00 W  (max = 944.00 W)
pout1:                         72.00 W  (max = 840.00 W, crit =   0.00 W)
                                        (cap =   0.00 W)
iin:                           +0.41 A  (max =  +5.19 A, crit max =  +5.40 A)
iout1:                         +5.85 A  (crit min =  +0.00 A, max = +68.25 A)
                                        (crit max = +71.50 A)

@keboliu
Copy link
Collaborator

keboliu commented Jul 13, 2020

want to understand how will this sensor work with other devices? For example, for PSU we have "get_output_voltage", "get_output_current", "get_output_power"..., for thermal sensors we now have a thermal_base.py?

@jleveque jleveque force-pushed the master branch 2 times, most recently from affe6be to c31636e Compare February 10, 2021 22:57
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
- Add entries to ignore files generated when building Python 2 and 3 wheel packages of the daemons
- Ignore 'thermalctldc' file
- Organize alphabetically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants