Permalink
Browse files

Bug fixing which occur while big load

  • Loading branch information...
1 parent e32b8c2 commit 5081d5950abbf547ae6dbd7bd6d6cfb26f6ca9bc @shunanya shunanya committed Mar 7, 2012
@@ -61,6 +61,24 @@ do
tmp="${hash[$tot]}"
tmp=$tmp"|${hash[${dir[0]}]}|${hash["${dir[0]}""$c1xx"]}|${hash["${dir[0]}""$c2xx"]}|${hash["${dir[0]}""$c3xx"]}|${hash["${dir[0]}""$c4xx"]}|${hash["${dir[0]}""$c5xx"]}"
tmp=$tmp"|${hash[${dir[1]}]}|${hash["${dir[1]}""$c1xx"]}|${hash["${dir[1]}""$c2xx"]}|${hash["${dir[1]}""$c3xx"]}|${hash["${dir[1]}""$c4xx"]}|${hash["${dir[1]}""$c5xx"]}"
+
+ if [[ !(-e $RES_FILE) ]]
+ then # initializing
+ hash[$tot]=0
+ hash[$successful]=0
+ hash[${dir[0]}]=0
+ hash[${dir[1]}]=0
+ hash["${dir[0]}""$c1xx"]=0
+ hash["${dir[1]}""$c1xx"]=0
+ hash["${dir[0]}""$c2xx"]=0
+ hash["${dir[1]}""$c2xx"]=0
+ hash["${dir[0]}""$c3xx"]=0
+ hash["${dir[1]}""$c3xx"]=0
+ hash["${dir[0]}""$c4xx"]=0
+ hash["${dir[1]}""$c4xx"]=0
+ hash["${dir[0]}""$c5xx"]=0
+ hash["${dir[1]}""$c5xx"]=0
+ fi
echo "$tmp" > $RES_FILE #write to file
done
@@ -13,7 +13,7 @@ declare -r MONITOR_TYPE="BASH_Monitor" # type for custom monitor
declare -r RESULT_PARAMS="status:status::3;in_load:in_load:reqps:4;o1_load:out1_load:reqps:4;o2_load:out2_load:reqps:4;o1_perc:out1_reqs:perc:4;o2_perc:out2_reqs:perc:4;ok1:out1_2XX:perc:4;ok2:out2_2XX:perc:4" # format of result params - name1:displayName1:uom1:Integer
declare -r ADDITIONAL_PARAMS="details:info::3" # format of additional params - name:displayName:uom:String
-declare -r DUMMY_RESULT="status:IDLE;in:0;out1:0;out2:0;ok1:0;ok2:0 | details + No input request to Nginx."
+declare -r DUMMY_RESULT="status:IDLE;in_load:0;o1_load:0;o2_load:0;o1_perc:0;o2_perc:0;ok1:0;ok2:0 | details + No input request to Nginx."
declare -r DEAD_RESULT="status:DEAD | details + Nginx process not found"
declare -r OK_STATUS="status:OK"

0 comments on commit 5081d59

Please sign in to comment.