Is there a way to add to reporting HBA temperature?

demon

Contributor
Joined
Dec 6, 2014
Messages
117
I recently upgraded my NAS with a Broadcom/LSI 9400-16i SAS HBA, which is working well, but I'd like to add monitoring of the temperature of that HBA to the collected values in the "Reporting" section of the TrueNAS web console. Is there a means by which that can be done? I have a couple different options for means by which to collect the temperature value (either using sed/awk and storcli, or awk and mprutil), but I don't see any means by which to add a graph and collect data for it. Is that a feature that exists?
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
Such customizations have never seen the light of day :/

I've not dug into this topic, I'm curious to see what my HBAs (lsi 9201, lsi 9211) potentially have for data to display.

Can you perhaps share a couple of one liner options ?
 

demon

Contributor
Joined
Dec 6, 2014
Messages
117
Unfortunately with my old 9211-8i HBAs, they don't actually have temperature sensors (apparently that only came with the 9300s?), but with the board I have in there now, I can do:
mprutil -u 0 show cfgpage page 7 | awk '{ if ($1 == "0010") { printf "%d ", "0x" $4 $5; if ($3 == "00") printf "N/A"; else if ($3 == "01") printf "F"; else if ($3 == "02") printf "C"; print "" } }' 46 C

or:
storcli /c0 show all nolog | gsed -n -r -e 's/^ROC temperature\(Degree ([CF])[[:alpha:]]+\) = ([[:digit:]]+)$/\2 \1/p' 46 C
 
Last edited:

hammermaster

Cadet
Joined
Jan 29, 2023
Messages
9
Unfortunately with my old 9211-8i HBAs, they don't actually have temperature sensors (apparently that only came with the 9300s?), but with the board I have in there now, I can do:
mprutil -u 0 show cfgpage page 7 | awk '{ if ($1 == "0010") { printf "%d ", "0x" $4 $5; if ($3 == "00") printf "N/A"; else if ($3 == "01") printf "F"; else if ($3 == "02") printf "C"; print "" } }' 46 C

or:
storcli /c0 show all nolog | gsed -n -r -e 's/^ROC temperature\(Degree ([CF])[[:alpha:]]+\) = ([[:digit:]]+)$/\2 \1/p' 46 C
Feel free to change "mprutil" to "mpsutil" to grab the temperature from SAS2308 (9211-8i) cards.

mpsutil -u 0 show cfgpage page 7 | awk '{ if ($1 == "0010") { printf "%d ", "0x" $4 $5; if ($3 == "00") printf "N/A"; else if ($3 == "01") printf "F"; else if ($3 == "02") printf "C"; print "" } }' 73 C
 

hammermaster

Cadet
Joined
Jan 29, 2023
Messages
9
Further reading of the the 9211-8i manual indiactes and Atmospheric temperature range of 0 - 55oC. Not sure if the output of 73oC from the CMD above makes sense or not. It would have to be validated. The case my card is in definitely has a lot of airflow. I will have to IR gun the heatsink next time I have it open.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Unfortunately with my old 9211-8i HBAs, they don't actually have temperature sensors (apparently that only came with the 9300s?), but with the board I have in there now, I can do:

The SAS2008 does not have a temperature sensor. The 2308 and I think almost everything else does.
 

MisterE2002

Patron
Joined
Sep 5, 2015
Messages
211
Those commands are only for CORE? Only "storcli" is found on my SCALE box but it does not find controller 0. (and i have a 2308 HBA)
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Those commands are only for CORE? Only "storcli" is found on my SCALE box but it does not find controller 0. (and i have a 2308 HBA)

"storcli" is used to interface with MegaRAID controllers, something which you should never have on a TrueNAS system anyways, in my opinion.

Your HBA is probably not a MegaRAID controller, because it presumably has IT firmware loaded on it, which makes it an HBA. "mprutil" and "mpsutil" are the tools for manipulating HBA's.

I just checked on the one SCALE box I have, and you're correct, it doesn't seem to have "mprutil" or "mpsutil". I would consider this to be a bug, and I recommend you report it as such. It could be that whoever did the SCALE porting work didn't understand these to be very useful tools for interacting with the LSI HBA cards. Please post a Jira ticket number back here if you do.
 

MisterE2002

Patron
Joined
Sep 5, 2015
Messages
211
"storcli" is used to interface with MegaRAID controllers, something which you should never have on a TrueNAS system anyways, in my opinion.

Your HBA is probably not a MegaRAID controller, because it presumably has IT firmware loaded on it, which makes it an HBA. "mprutil" and "mpsutil" are the tools for manipulating HBA's.

I just checked on the one SCALE box I have, and you're correct, it doesn't seem to have "mprutil" or "mpsutil". I would consider this to be a bug, and I recommend you report it as such. It could be that whoever did the SCALE porting work didn't understand these to be very useful tools for interacting with the LSI HBA cards. Please post a Jira ticket number back here if you do.
thanks, created https://ixsystems.atlassian.net/browse/NAS-120151
 
Top