Hi there
Does anyone know a way to monitor the temperature of a LSI SAS 2308 HBA (flashed in IT mode of course) using the cli in SCALE?
In CORE, I could run the following command (which uses mpsutil
) to get the temperature from the onboard sensor:
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 "" } }'
I believe mpsutil
is FreeBSD-based, and in Linux, SCALE includes storcli
, however, storcli doesn’t seem to detect my HBA card in order to query the temperature?
Any tips most welcome 
The following works for me:
storcli /call show all nolog | grep "ROC temperature"
I then munge a bit using awk
, but the details may change based on the exact version of storcli and your exact HBA. The grep
might even need to change, as I have an HBA based on a 3008 chip.
2 Likes
Thank you for that suggestion - much appreciated!
Unfortunately, when I run any storcli
commands I get the “no controller found” output:
CLI Version = 007.1504.0000.0000 June 22, 2020
Operating system = Linux 6.6.29-production+truenas
Status = Failure
Description = No Controller found
However, sas2flash
quite happily detects the controller (as did mpsutil
in CORE), so a bit of a head-scratcher really.
I found this instruction that involves using a non-native binary to do it:
https://www.reddit.com/r/homelab/comments/cqvxeb/comment/kj5mgg4/
Your mileage may vary.
1 Like
Thank you - yes I found that link too, but was hesitant to drop “unknown” binaries onto my TrueNAS and start running commands I’m not overly familiar with.
I may see if I can compile the tool from the source at least and then see from there if I’m comfortable to give it a try.
I was just hoping there was a “native” tool in SCALE to query the temperature, as I thought this would be a fairly common thing for people to keep an eye on, especially as it was simple to do from CORE.
I applaud your stance, it’s good to be careful.
1 Like
Install LSIUtil from here:
Use this to get the temperature:
#!/bin/sh
lsiutil="/path/to/lsiutil"
"$lsiutil" -p1 -a 25,2,0,0 | awk '/IOCTemperature: /{print strtonum($2)" C"}'
Explanation here:
https://old.reddit.com/r/homelab/comments/cqvxeb/monitoring_the_status_of_a_92118i_hba_in_itmode/kj5mgg4/
If you’re hesitant to use the binaries, create a jlmkr container and compile from source.
1 Like
Thank you for the idea on compiling from source in jlmkr
- may give that a go.