1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-25 18:38:30 +00:00

Whitespace cleanup

* remove trailing whitespace
* remove empty lines at the end of files
This commit is contained in:
Lars Kruse 2018-08-02 02:03:42 +02:00
parent ef851f0c34
commit 17f784270a
604 changed files with 2927 additions and 2945 deletions

View file

@ -21,7 +21,7 @@
#
# env.sge_settings - Path to SGE settings.sh script, defaults to /opt/sge/default/common/settings.sh
# env.title - Graph title, overrides "SGE Queue state".
# env.options - Additional command line options to qstat.
# env.options - Additional command line options to qstat.
# env.queues - list of queues to summarize
#
# Revisions:
@ -35,7 +35,7 @@
SGE_SETTINGS=${sge_settings:-/opt/sge/default/common/settings.sh}
# queues to monitor
# queues to monitor
# priority 1: queue name in symlink
QUEUE=${0##*_}
# priority 2: queue names from environment
@ -92,17 +92,17 @@ if [ "$1" = "autoconf" ]; then
if [ -n "$QSTAT" -a -n "$XMLSTARLET" ]; then
echo "yes"
exit 0
else
else
echo "no"
exit 1
fi
fi
# check requirements
[ -z "$QSTAT" ] && { echo "qstat not found" 1>&2 ; exit 1; }
[ -z "$XMLSTARLET" ] && { echo "xmlstarlet not found" 1>&2 ; exit 1; }
# check requirements
[ -z "$QSTAT" ] && { echo "qstat not found" 1>&2 ; exit 1; }
[ -z "$XMLSTARLET" ] && { echo "xmlstarlet not found" 1>&2 ; exit 1; }
ALL_QUEUES=$( $QSTAT -g c -xml | $XMLSTARLET sel -T -t -m "//cluster_queue_summary/name" -v "node()" -o "," )
ALL_QUEUES=$( $QSTAT -g c -xml | $XMLSTARLET sel -T -t -m "//cluster_queue_summary/name" -v "node()" -o "," )
[ "$QUEUE" == "Summary" ] && QUEUE="$ALL_QUEUES"
if [ "$1" = "suggest" ]; then
@ -130,7 +130,7 @@ xmldemangle() {
printvalues() {
local IFSBAK=$IFS; unset IFS
for i in ${!_SGE_QUEUE_KEYS[@]}
do
do
echo "${_SGE_QUEUE_KEYS[$i]}.value ${_SGE_QUEUE_VALUES[$i]}"
done
IFS=$IFSBAK
@ -153,7 +153,7 @@ do
xmldemangle || echo "Error on QUEUE: $qu" 1>&2
for i in ${!_SGE_QUEUE_KEYS[@]}
do
do
_SGE_QUEUE_VALUES[$i]=${_SGE_QUEUE_VALUES[$i]:-0}
let "_SGE_QUEUE_VALUES[$i] += ${_SGE_XML[$i]:-0}"
done