diff --git a/text_collector_examples/smartmon.sh b/text_collector_examples/smartmon.sh index 5c8077f5..a54f0ca6 100755 --- a/text_collector_examples/smartmon.sh +++ b/text_collector_examples/smartmon.sh @@ -7,8 +7,6 @@ # data in them than you'd think. # http://arstechnica.com/civis/viewtopic.php?p=22062211 -disks="$(/usr/sbin/smartctl --scan | awk '{print $1 "|" $3}')" - parse_smartctl_attributes_awk="$(cat << 'SMARTCTLAWK' $1 ~ /^[0-9]+$/ && $2 ~ /^[a-zA-Z0-9_-]+$/ { gsub(/-/, "_"); @@ -136,7 +134,7 @@ if [[ "$(expr "${smartctl_version}" : '\([0-9]*\)\..*')" -lt 6 ]] ; then exit fi -device_list="$(/usr/sbin/smartctl --scan-open | awk '{print $1 "|" $3}')" +device_list="$(/usr/sbin/smartctl --scan-open | awk '/^\/dev/{print $1 "|" $3}')" for device in ${device_list}; do disk="$(echo ${device} | cut -f1 -d'|')"