diff --git a/script/monitor/generic/DEV_USAGE_CHECK.sh b/script/monitor/generic/DEV_USAGE_CHECK.sh index 9dc9f7c..66b2255 100755 --- a/script/monitor/generic/DEV_USAGE_CHECK.sh +++ b/script/monitor/generic/DEV_USAGE_CHECK.sh @@ -5,7 +5,8 @@ base.loadModule ssh function testSpace(){ - local _RESULT=$(ssh.onHostRun "monitoring@${1:?"Missing REMOTE_HOST"}" 'df "/" | tail -n1 | tr -s "[:blank:]" " " | cut -d" " -f1,5') + local _RESPONSE=$(ssh.onHostRun "monitoring@${1:?"Missing REMOTE_HOST"}" 'df "/" | tail -n1') + local _RESULT=$(echo "${_RESPONSE}" | tr -s "[:blank:]" " " | cut -d" " -f1,5) local _DEV=$(echo "${_RESULT}" | tail -n 1 | cut -d' ' -f1) local _SPACE_USED=$(echo "${_RESULT}" | tail -n 1 | cut -d' ' -f2)