summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2023-10-03 10:44:08 +0200
committerpks <pks@pks.rocks>2023-10-03 10:44:08 +0200
commit1f8ec503dec62b5bd3a3a85bd7393fbd6ccb76dd (patch)
treeeb67ca7f66a7d778a87ca5b20ac64b0b7ec65cf3
parentea190d75a89ea9391237cb57a5f5c367fb44bfb5 (diff)
temperatures: updateHEADmaster
-rwxr-xr-xtemperatures4
1 files changed, 2 insertions, 2 deletions
diff --git a/temperatures b/temperatures
index a542773..2ccb601 100755
--- a/temperatures
+++ b/temperatures
@@ -4,12 +4,12 @@ host=$(hostname)
if [[ $host == "durant" ]]; then
#echo "CPU: $(sensors | sed "s|\s\+| |g" | grep Package | cut -d " " -f 4)"
- echo "CPU: $(ipmitool sensor | sed "s|\s\+| |g" | grep CPU | cut -d " " -f 4 | cut -d. -f 1)°C"
+ echo "CPU: $(ipmitool sensor 2>/dev/null | sed "s|\s\+| |g" | grep CPU | cut -d " " -f 4 | cut -d. -f 1)°C"
for disk in `fdisk -l 2>/dev/null | grep -P "/dev" | grep Disk | cut -d " " -f 2 | sed "s|:||"`; do
case $disk in
/dev/nvme*)
TEMP=$(nvme smart-log $disk | grep temperature | sed "s|\s\+| |g" | cut -d " " -f 3 | sed "s|C||")
- echo "$disk\t$TEMP°C"
+ echo "$disk\t${TEMP}C"
;;
/dev/sd*)
TEMP=$(smartctl -a $disk | grep Temp | cut -d " " -f 37 | tr '\n' ' ' | sed "s|\s*||g")