mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Whitespace cleanup
* remove trailing whitespace * remove empty lines at the end of files
This commit is contained in:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -22,7 +22,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.
|
||||
#
|
||||
# Revisions:
|
||||
# v1.0 2009-07-19
|
||||
|
@ -93,7 +93,7 @@ if [ "$1" = "autoconf" ]; then
|
|||
if which qstat > /dev/null; then
|
||||
echo "yes"
|
||||
exit 0
|
||||
else
|
||||
else
|
||||
echo "no"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -102,8 +102,8 @@ fi
|
|||
# env.options
|
||||
OPTIONS="-g c -q $QUEUE $options"
|
||||
|
||||
# qstat -g c example output:
|
||||
# CLUSTER QUEUE CQLOAD USED RES AVAIL TOTAL aoACDS cdsuE
|
||||
# qstat -g c example output:
|
||||
# CLUSTER QUEUE CQLOAD USED RES AVAIL TOTAL aoACDS cdsuE
|
||||
# --------------------------------------------------------------------------------
|
||||
# all.q 0.00 16 8 48 64 0 0
|
||||
qstat $OPTIONS | tail -n 1 | awk '{print "unavailable.value " $8 "\nreserved.value " $4 "\nused.value " $3 "\nfree.value " $5-$4}'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue