Ubuntu Version
24.04.3
I found a nice script to get smartctl to output drive temperatures for the drives in my RAID box, but I’d like to also display my drive names in the output as well.
My script contains this line of code, I apologize if I’ve displayed my code incorrectly:
find /dev/sd? -exec smartctl -a {} \; | grep -i Temperature_Celsius
Which reports back the twelve drives in my ZFS RAID and the boot drive
The output also displays which drives are reporting Old_age for some reason, but I’m okay with that.
Output:
194 Temperature_Celsius 0x0022 026 047 000 Old_age Always - 26 (0 14 0 0 0)
194 Temperature_Celsius 0x0022 026 046 000 Old_age Always - 26 (0 15 0 0 0)
194 Temperature_Celsius 0x0022 114 084 000 Old_age Always - 33
194 Temperature_Celsius 0x0022 071 063 000 Old_age Always - 29 (Min/Max 29/37)
194 Temperature_Celsius 0x0022 027 048 000 Old_age Always - 27 (0 15 0 0 0)
194 Temperature_Celsius 0x0022 070 059 000 Old_age Always - 30 (Min/Max 26/41)
194 Temperature_Celsius 0x0022 026 048 000 Old_age Always - 26 (0 14 0 0 0)
194 Temperature_Celsius 0x0022 026 046 000 Old_age Always - 26 (0 14 0 0 0)
194 Temperature_Celsius 0x0022 026 047 000 Old_age Always - 26 (0 14 0 0 0)
194 Temperature_Celsius 0x0022 027 049 000 Old_age Always - 27 (0 15 0 0 0)
194 Temperature_Celsius 0x0022 026 046 000 Old_age Always - 26 (0 15 0 0 0)
194 Temperature_Celsius 0x0022 026 046 000 Old_age Always - 26 (0 14 0 0 0)
194 Temperature_Celsius 0x0022 027 047 000 Old_age Always - 27 (0 15 0 0 0)
I spent time Googling for an answer but with no success. I admit that my scripting skills aren’t particularly good.
I’d appreciate any help I can get.