Projet

Général

Profil

Révision 17f78427

ID17f784270ae966ee9a13e9f5104a5b8f925b639e
Parent ef851f0c
Enfant d4320aea, 5b2396a9

Ajouté par Lars Kruse il y a plus de 7 ans

Whitespace cleanup

  • remove trailing whitespace
  • remove empty lines at the end of files

Voir les différences:

plugins/sge/sge_queue_xml_
21 21
#
22 22
#   env.sge_settings - Path to SGE settings.sh script, defaults to /opt/sge/default/common/settings.sh
23 23
#   env.title        - Graph title, overrides "SGE Queue state".
24
#   env.options      - Additional command line options to qstat. 
24
#   env.options      - Additional command line options to qstat.
25 25
#   env.queues       - list of queues to summarize
26 26
#
27 27
# Revisions:
......
35 35
SGE_SETTINGS=${sge_settings:-/opt/sge/default/common/settings.sh}
36 36

  
37 37

  
38
# queues to monitor 
38
# queues to monitor
39 39
# priority 1: queue name in symlink
40 40
QUEUE=${0##*_}
41 41
# priority 2: queue names from environment
......
92 92
    if [ -n "$QSTAT" -a -n "$XMLSTARLET" ]; then
93 93
        echo "yes"
94 94
        exit 0
95
    else 
95
    else
96 96
        echo "no"
97 97
        exit 1
98 98
    fi
99 99
fi
100 100

  
101
# check requirements 
102
[ -z "$QSTAT" ] && { echo "qstat not found" 1>&2 ; exit 1; } 
103
[ -z "$XMLSTARLET" ] && { echo "xmlstarlet not found" 1>&2  ; exit 1; } 
101
# check requirements
102
[ -z "$QSTAT" ] && { echo "qstat not found" 1>&2 ; exit 1; }
103
[ -z "$XMLSTARLET" ] && { echo "xmlstarlet not found" 1>&2  ; exit 1; }
104 104

  
105
ALL_QUEUES=$( $QSTAT -g c -xml | $XMLSTARLET sel -T -t -m "//cluster_queue_summary/name" -v "node()" -o "," ) 
105
ALL_QUEUES=$( $QSTAT -g c -xml | $XMLSTARLET sel -T -t -m "//cluster_queue_summary/name" -v "node()" -o "," )
106 106
[ "$QUEUE" == "Summary" ] && QUEUE="$ALL_QUEUES"
107 107

  
108 108
if [ "$1" = "suggest" ]; then
......
130 130
printvalues() {
131 131
	local IFSBAK=$IFS; unset IFS
132 132
	for i in ${!_SGE_QUEUE_KEYS[@]}
133
	do 
133
	do
134 134
		echo "${_SGE_QUEUE_KEYS[$i]}.value ${_SGE_QUEUE_VALUES[$i]}"
135 135
	done
136 136
	IFS=$IFSBAK
......
153 153
	xmldemangle || echo "Error on QUEUE: $qu" 1>&2
154 154

  
155 155
	for i in ${!_SGE_QUEUE_KEYS[@]}
156
	do 
156
	do
157 157
		_SGE_QUEUE_VALUES[$i]=${_SGE_QUEUE_VALUES[$i]:-0}
158 158
		let "_SGE_QUEUE_VALUES[$i] += ${_SGE_XML[$i]:-0}"
159 159
	done

Formats disponibles : Unified diff