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

Merge branch '6010-check-pqsql' into 'master'

psql: add output

See merge request !111
parents e6ffb8d3 74250085
No related branches found
No related tags found
1 merge request!111psql: add output
......@@ -247,7 +247,7 @@ case "${sMode}" in
"conflicts")
deltaunit=min
descr="Detected conflicts (from pg_stat_database_conflicts)"
descr="(from pg_stat_database_conflicts)"
renderCounters "select \
sum(confl_tablespace) as confl_tablespace, \
sum(confl_lock) as confl_lock, \
......@@ -259,7 +259,10 @@ case "${sMode}" in
# sum of 7th column (with delta per sec)
typeset -i iTotal; iTotal=$( echo "$out" | awk '{ sum+=$7} END { print sum;}' )
if [ $iTotal -gt 0 ]; then
ph.setStatus "critical"
ph.setStatus "critical"
descr+=" ... $iTotal conflicts detected"
else
descr+=" ... OK, nothing was found"
fi
descr+=" - currently $iTotal per ${deltaunit}"
;;
......@@ -297,7 +300,10 @@ case "${sMode}" in
# sum of 7th column (with delta per sec)
typeset -i iTotal; iTotal=$( echo "$out" | awk '{ sum+=$7} END { print sum;}' )
if [ $iTotal -gt 0 ]; then
ph.setStatus "critical"
ph.setStatus "critical"
descr+="... $iTotal Problems and troublemakers were found"
else
descr+=" ... OK, nothing was found"
fi
descr+=" - currently $iTotal per ${deltaunit}"
;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment