hddtemp from arch linux workstation PC
Hello,
I wonder if anyone has the local HDDTEMP script working on an Archlinux PC that could help me.
It works fine on my server (ubuntu), but I just get intermittent output of 1 disk (sda) and no temp reading at all from the Arch linux PC.
It seems to be:
if [ $? -eq 0 ] && [ `$nc -zv $hostname $port 2>&1 | awk '{print $5}'` = "open" ]
that causes the error and I am not knowledgeable enough to work out a solution.
nc localhost 7634 outputs... |/dev/sda|TOSHIBA THNSNH128GBST|30|C||/dev/sdb|ST500DM002-1BD142|32|C||/dev/sdc|Hitachi HDT725050VLA360|38|C|
Thank you, Fordy.
#!/bin/sh
# hddtemp sensor readings # needs hddtemp daemon listening on (at least) localhost # requires netcat to be installed and in the path # (c) 2012, Tom Laermans for Observium
hostname="localhost" port=7634 nc=`which nc`
if [ $? -eq 0 ] && [ `$nc -zv $hostname $port 2>&1 | awk '{print $5}'` = "open" ] then echo '<<<hddtemp>>>' $nc $hostname $port echo fi
participants (1)
-
David Ford