46cc6968d7
1) Fixing the issues while applying platform TxCTLE settings in sfputil.py for QFX5200 2) Adding the support for transceiver dom threshold info in sfputil.py for both QFX5210 & QFX5200 platforms 3) Updating the sfputil.py for QFX5210 & QFX5200 platforms 4) Adding a new platform specific command 'show_thresholds' to display the FAN dutycycle percentage for various temperature ranges (for both AFI & AFO QFX5200 systems). Signed-off-by: Ciju Rajan K <crajank@juniper.net>
25 lines
694 B
Python
Executable File
25 lines
694 B
Python
Executable File
#!/usr/bin/env python
|
|
import commands
|
|
def main():
|
|
FAN0_TYPE="cat /sys/devices/pci0000:00/0000:00:1c.0/0000:0f:00.0/refpga-tmc.15/fan0_type"
|
|
|
|
try:
|
|
status,fan0_type=commands.getstatusoutput(FAN0_TYPE)
|
|
except Exception as e:
|
|
print "Error on refpga-tmc.15 fan0_type e:" + str(e)
|
|
return False
|
|
|
|
AFO = "1"
|
|
|
|
if fan0_type == AFO:
|
|
temp_thres_file = open("/usr/local/bin/temperature_thresholds_AFO.txt", "r+")
|
|
print temp_thres_file.read()
|
|
else:
|
|
temp_thres_file = open("/usr/local/bin/temperature_thresholds_AFI.txt", "r+")
|
|
print temp_thres_file.read()
|
|
|
|
temp_thres_file.close()
|
|
|
|
if __name__ == "__main__":
|
|
main()
|