Projet

Général

Profil

Révision 72bdea8b

ID72bdea8bb1a7197b3c5f44c72b5fe0f7651a962f
Parent 5868867e
Enfant b657debc

Ajouté par Diver il y a presque 9 ans

Lots of small cleanups

Voir les différences:

plugins/emc/emc_vnx_block_lun_perfdata
145 145

  
146 146
. "$MUNIN_LIBDIR/plugins/plugin.sh"
147 147

  
148
cs_addr=""
149
username=""
150
blockpw=""
151

  
148 152
TARGET=$(echo "${0##*/}" | cut -d _ -f 6)
149 153

  
150 154
# "All Storage Processors we have"
......
160 164
	NAVICLI="/nas/sbin/navicli"
161 165
fi
162 166

  
163

  
167
# Prints "10" on stdout if found Primary Online control station. "11" - for Secondary Online control station. 
164 168
ssh_check_cmd() {
165
		ssh -q $username@$1 "/nasmcd/sbin/getreason | grep -w slot_\`/nasmcd/sbin/t2slot\` | cut -d- -f1"
169
		ssh -q "$username@$1" '/nasmcd/sbin/getreason | grep -w "slot_$(/nasmcd/sbin/t2slot)" | cut -d- -f1'
166 170
}
167 171

  
168 172

  
......
204 208
	fi
205 209
	local probe_sp
206 210
	for probe_sp in $SPALL; do
207
		if $SSH $NAVICLI -h $probe_sp >/dev/null 2>&1; then
208
			StorageProcessor=$probe_sp
211
		if $SSH $NAVICLI -h "$probe_sp" >/dev/null 2>&1; then
212
			StorageProcessor="$probe_sp"
209 213
			break
210 214
		fi
211 215
	done
......
240 244
}
241 245

  
242 246
# Get Lun List
243
LUNLIST=$(run_navicli lun -list -drivetype | sed -ne 's/^Name:\ *//p')
244
echo "${TARGET}"
247
LUNLIST=$(run_navicli lun -list -drivetype | sed -ne 's/^Name:\ *//p' | sort)
245 248

  
246 249
echo "host_name ${TARGET}"
247 250
echo

Formats disponibles : Unified diff