File tree Expand file tree Collapse file tree 3 files changed +3
-21
lines changed
platform/broadcom/sonic-platform-modules-accton/as5835-54x Expand file tree Collapse file tree 3 files changed +3
-21
lines changed Original file line number Diff line number Diff line change 77#############################################################################
88
99try :
10- import os
11- import sys
1210 from sonic_platform_pddf_base .pddf_watchdog import PddfWatchdog
1311except ImportError as e :
1412 raise ImportError (str (e ) + "- required module not found" )
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python
1+ #!/usr/bin/env python3
22#
33# Copyright (C) 2019 Accton Technology Corporation
44#
2323# ------------------------------------------------------------------
2424
2525try :
26- import os
2726 import sys , getopt
28- import subprocess
29- import click
30- import imp
3127 import logging
3228 import logging .config
33- import types
34- import time # this is only being used as part of the example
35- import traceback
29+ import time
3630 import signal
3731 from tabulate import tabulate
3832 from sonic_platform import platform
4438FUNCTION_NAME = 'accton_as5835_54x_monitor'
4539DUTY_MAX = 100
4640
47- global log_file
48- global log_level
4941platform_chassis = None
5042
5143test_temp = 0
@@ -88,7 +80,6 @@ def manage_fans(self):
8880
8981 THERMAL_NUM_MAX = 4
9082 FAN_LEV1_UP_TEMP = 57700 # temperature
91- FAN_LEV1_DOWN_TEMP = 0 # unused
9283 FAN_LEV1_SPEED_PERC = DUTY_MAX # percentage*/
9384
9485 FAN_LEV2_UP_TEMP = 53000
@@ -99,27 +90,22 @@ def manage_fans(self):
9990 FAN_LEV3_DOWN_TEMP = 47700
10091 FAN_LEV3_SPEED_PERC = 65
10192
102- FAN_LEV4_UP_TEMP = 0 # unused
10393 FAN_LEV4_DOWN_TEMP = 42700
10494 FAN_LEV4_SPEED_PERC = 40
10595
10696 FAN_NUM = 2
10797 FAN_TRAY_NUM = 5
108-
109- #thermal = ThermalUtil()
110- #fan = FanUtil()
98+
11199 if test_temp_revert == 0 :
112100 temp_test_data = temp_test_data + 2000
113101 else :
114102 temp_test_data = temp_test_data - 2000
115103
116104 if test_temp == 0 :
117- #temp2 = thermal.get_thermal_2_val()
118105 temp2 = platform_chassis .get_thermal (1 ).get_temperature ()* 1000
119106 if temp2 is None :
120107 return False
121108
122- #temp3 = thermal.get_thermal_3_val()
123109 temp3 = platform_chassis .get_thermal (2 ).get_temperature ()* 1000
124110 if temp3 is None :
125111 return False
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22# Script to stop and start the respective platforms default services.
33# This will be used while switching the pddf->non-pddf mode and vice versa
4- import os
5- import sys
64import commands
75
86def check_pddf_support ():
You can’t perform that action at this time.
0 commit comments