Skip to content
Snippets Groups Projects
Commit 42b157db authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch '6588-add-couchdb-check' into 'master'

fix grep in value loop

See merge request !156
parents 9b56316e 0569d0ea
No related branches found
No related tags found
1 merge request!156fix grep in value loop
......@@ -145,7 +145,7 @@ case "${sMode}" in
ph.status "Couchdb :: Http request methods"
printf "%30s %10s %10s\n" "Property" "Counter" "Delta" | tr ' ' '_'
for myVar in $( grep "[a-z\_]" <<< "$_status" | cut -f 1 -d ':' )
for myVar in $( grep "^[a-z\_]" <<< "$_status" | cut -f 1 -d ':' )
do
_iValue=$( grep "^${myVar}:" <<< "$_status" | cut -f 2 -d ':' )
_label="couchdb-hp-${myVar//_/-}" # underscrore to minus
......@@ -173,9 +173,9 @@ case "${sMode}" in
ph.status "Couchdb :: Http request methods"
printf "%10s %10s %10s\n" "Method" "Counter" "Delta" | tr ' ' '_'
for myVar in $( grep "[A-Z]" <<< "$_status" | cut -f 1 -d ':' )
for myVar in $( grep "^[A-Z]" <<< "$_status" | cut -f 1 -d ':' )
do
_iValue=$( grep "$myVar" <<< "$_status" | cut -f 2 -d ':' )
_iValue=$( grep "^$myVar:" <<< "$_status" | cut -f 2 -d ':' )
_label="couchdb-hm-${myVar//_/-}" # underscrore to minus
_iDelta=$( ph.perfdeltaspeed "${_label}" $_iValue)
printf "%10s %10s %10s per sec\n" "$myVar" $_iValue $_iDelta
......@@ -202,9 +202,9 @@ case "${sMode}" in
ph.status "Couchdb :: Http status codes"
printf "%10s %10s %10s\n" "Status" "Counter" "Delta" | tr ' ' '_'
for myVar in $( grep "[1-9]" <<< "$_status" | cut -f 1 -d ':' )
for myVar in $( grep "^[1-9]" <<< "$_status" | cut -f 1 -d ':' )
do
_iValue=$( grep "$myVar" <<< "$_status" | cut -f 2 -d ':' )
_iValue=$( grep "^$myVar:" <<< "$_status" | cut -f 2 -d ':' )
_label="couchdb-hs-${myVar//_/-}" # underscrore to minus
_iDelta=$( ph.perfdeltaspeed "${_label}" $_iValue)
printf "%10s %10s %10s per sec\n" "$myVar" $_iValue $_iDelta
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment