OmniOS Temps
I got a new system to run my OmniOS NAS on. While setting it up I needed to slightly modify my bash script to check temperatures to account for the different hardware present. Thought I’d share what I’m using to check the temperatures of everything.
CPU Temps⌗
Illumos has a useful tool fmtopo
to list hardware as part of the fault management system. It’s not documented and not in default PATH
which is a shame. The following will print everything with a temperature sensor:
/usr/lib/fm/fmd/fmtopo -V *sensor=temp
On my previous system this gave four items; CPU, Core0, Core1, and motherboard. On my new system it spits out an item for each CPU core but they all give the same readings. So your experience may vary.
...
hc://:product-id=WTR-PRO:server-id=hoard:chassis-id=Default-string/motherboard=0
/chip=0/core=0?sensor=temp
group: protocol version: 1 stability: Private/Private
resource fmri hc://:product-id=WTR-PRO:server-id=hoard:chassis
-id=Default-string/motherboard=0/chip=0/core=0?sensor=temp
group: authority version: 1 stability: Private/Private
product-id string WTR-PRO
chassis-id string Default-string
server-id string hoard
group: facility version: 1 stability: Private/Private
sensor-class string threshold
type uint32 0x10f (SYNTHETIC)
units uint32 0x201 (NONE)
reading double 43.375000
...
The temperature is on the lines with ‘reading’.
NVMe Temps⌗
Another tool included is nvmeadm
for talking to NVMe SSDs. The following will give you all of the health information for nvme0
, including temperature sensor readings:
nvmeadm -v get-logpage nvme0 health
...
Critical Composite Temperature Time: 0min
Temperature Sensor 1: 49C
Temperature Sensor 2: 60C
Thermal Management Temp 1 Transition Count: 0
Thermal Management Temp 2 Transition Count: 0
...
You need to specify the device you want to check, nvmeadm list
will tell you all about them.
HDD Temps⌗
I may be missing something but I couldn’t find a way to check HDD temperatures just using tools that come installed by default. I resorted to installing smartmontools
to grab the HDD temperatures via SMART. While it’s in the standard OmniOS repo, I’m a bit surprised it’s not installed by default.
As with nvmeadm
, you need to specify the HDD you’re interested in:
smartctl -A /dev/rdsk/c4t1d0s0 | grep 'Temperature_Celsius'
194 Temperature_Celsius 0x0022 118 102 000 Old_age Always - 34
The temperature is all the way on the end there (34ºC).
temp.sh⌗
With my temperature sensors located, I wrote a basic system-specific script that queries everything and prints their temps in a somewhat neat manner. Mostly with copious usage of grep and awk.
root@hoard:~# ./temp.sh
CPU: 43.62
c3t0d0: 35
c3t1d0: 37
c4t0d0: 34
c4t1d0: 34
SSD: 49
SSD: 60
For me it’s enough to glance at every once in a while, don’t let me stop you from creating a temperature logging system though.
My current temp.sh
/usr/lib/fm/fmd/fmtopo -V *sensor=temp | grep 'reading' | head -n 1 | awk -v OFS='\t' '{print("CPU:", substr($3, 1, 5))}'
smartctl -A /dev/rdsk/c3t0d0s0 | grep 'Temperature_Celsius' | awk '{print("c3t0d0:", $10)}'
smartctl -A /dev/rdsk/c3t1d0s0 | grep 'Temperature_Celsius' | awk '{print("c3t1d0:", $10)}'
smartctl -A /dev/rdsk/c4t0d0s0 | grep 'Temperature_Celsius' | awk '{print("c4t0d0:", $10)}'
smartctl -A /dev/rdsk/c4t1d0s0 | grep 'Temperature_Celsius' | awk '{print("c4t1d0:", $10)}'
nvmeadm -v get-logpage nvme0 health | grep 'Temperature Sensor' | awk -v OFS='\t' '{print("SSD:", substr($4, 1, 2))}'