mirror of
https://github.com/m8tin/cis.git
synced 2026-08-01 11:47:31 +02:00
ssh remote command of DEV_USAGE_CHECK.sh is much simpler now
This commit is contained in:
@@ -5,7 +5,8 @@ base.loadModule ssh
|
|||||||
|
|
||||||
|
|
||||||
function testSpace(){
|
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 _DEV=$(echo "${_RESULT}" | tail -n 1 | cut -d' ' -f1)
|
||||||
local _SPACE_USED=$(echo "${_RESULT}" | tail -n 1 | cut -d' ' -f2)
|
local _SPACE_USED=$(echo "${_RESULT}" | tail -n 1 | cut -d' ' -f2)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user