Add logging for HDD temperature retrieval
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from .utilities import runCmd
|
from .utilities import log, runCmd
|
||||||
|
|
||||||
|
|
||||||
def findHddIdInNt():
|
def findHddIdInNt():
|
||||||
@@ -37,6 +37,7 @@ def findHddTemp(hddDict):
|
|||||||
for hddName in sorted(hddDict.keys()):
|
for hddName in sorted(hddDict.keys()):
|
||||||
cmd = f"smartctl -A {hddName} | grep Temperature_Celsius"
|
cmd = f"smartctl -A {hddName} | grep Temperature_Celsius"
|
||||||
hddTempString = runCmd(cmd)
|
hddTempString = runCmd(cmd)
|
||||||
|
log.logI(f'hddTempString = {hddTempString}')
|
||||||
hddTempList = hddTempString.split(" ")
|
hddTempList = hddTempString.split(" ")
|
||||||
hddTempList = [item for item in hddTempList if item != ""]
|
hddTempList = [item for item in hddTempList if item != ""]
|
||||||
if len(hddTempList) > 9:
|
if len(hddTempList) > 9:
|
||||||
|
|||||||
Reference in New Issue
Block a user