From 49a49e8c9d5349e4b715b735ca8dfea2cc522cea Mon Sep 17 00:00:00 2001 From: Jef Bucas Date: Mon, 9 Aug 2010 16:44:42 +0200 Subject: [PATCH] Added a check when VM is down, the values are not numerical --- plugins/other/esxi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/other/esxi b/plugins/other/esxi index 34506db1..866e02cd 100755 --- a/plugins/other/esxi +++ b/plugins/other/esxi @@ -73,6 +73,9 @@ function VMoverallCpuUsage () { while read c ; do temp="${c/*overallCpuUsage = /}" vmcpu[$n]="${temp/,*/}" + if [ "${vmcpu[$n]}" == "" ]; then + vmcpu[$n]="0" + fi (( n++ )) done <" ]; then + vmmem[$n]="0" + fi (( n++ )) done <" ]; then + vmmem[$n]="0" + fi (( n++ )) done <